Mercurial > cpython-lru_cache-weakref
annotate Include/moduleobject.h @ 58689:514b56efd89a 3.1
Merged revisions 77962 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r77962 | r.david.murray | 2010-02-04 11:41:57 -0500 (Thu, 04 Feb 2010) | 17 lines
Merged revisions 77943,77959-77960 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77943 | r.david.murray | 2010-02-03 08:36:23 -0500 (Wed, 03 Feb 2010) | 2 lines
Explicitly mention the default value for formatdate's usegmt parameter.
........
r77959 | nick.coghlan | 2010-02-04 07:43:58 -0500 (Thu, 04 Feb 2010) | 1 line
Issue 6760: Clarify args handling for subprocess.Popen. Patch by Chris Rebert
........
r77960 | r.david.murray | 2010-02-04 11:33:31 -0500 (Thu, 04 Feb 2010) | 2 lines
Add Chris Rebert to ACKS for issue 6760 Popen doc improvements.
........
................
| author | R. David Murray <rdmurray@bitdance.com> |
|---|---|
| date | Thu, 04 Feb 2010 16:44:31 +0000 |
| parents | 94f64f11fdd0 |
| children | ee765a67c0b1 |
| rev | line source |
|---|---|
| 145 | 1 |
| 6 | 2 /* Module object interface */ |
| 3 | |
|
13445
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
4 #ifndef Py_MODULEOBJECT_H |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
5 #define Py_MODULEOBJECT_H |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
6 #ifdef __cplusplus |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
7 extern "C" { |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
8 #endif |
|
091ca6b9348f
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
9 |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
19894
diff
changeset
|
10 PyAPI_DATA(PyTypeObject) PyModule_Type; |
| 6 | 11 |
|
19832
00d80947d817
PyModule_Check() now checks for subtype of module, as it should.
Guido van Rossum <guido@python.org>
parents:
14375
diff
changeset
|
12 #define PyModule_Check(op) PyObject_TypeCheck(op, &PyModule_Type) |
|
44351
86a2679dca46
#1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT.
Christian Heimes <christian@cheimes.de>
parents:
42845
diff
changeset
|
13 #define PyModule_CheckExact(op) (Py_TYPE(op) == &PyModule_Type) |
| 6 | 14 |
|
35999
9541369b0dca
Add const to several API functions that take char *.
Jeremy Hylton <jeremy@alum.mit.edu>
parents:
24752
diff
changeset
|
15 PyAPI_FUNC(PyObject *) PyModule_New(const char *); |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
19894
diff
changeset
|
16 PyAPI_FUNC(PyObject *) PyModule_GetDict(PyObject *); |
|
42845
3152df70517a
Get rid of more uses of string and use const in a few places.
Neal Norwitz <nnorwitz@gmail.com>
parents:
42334
diff
changeset
|
17 PyAPI_FUNC(const char *) PyModule_GetName(PyObject *); |
|
3152df70517a
Get rid of more uses of string and use const in a few places.
Neal Norwitz <nnorwitz@gmail.com>
parents:
42334
diff
changeset
|
18 PyAPI_FUNC(const char *) PyModule_GetFilename(PyObject *); |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
19894
diff
changeset
|
19 PyAPI_FUNC(void) _PyModule_Clear(PyObject *); |
|
47580
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
20 PyAPI_FUNC(struct PyModuleDef*) PyModule_GetDef(PyObject*); |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
21 PyAPI_FUNC(void*) PyModule_GetState(PyObject*); |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
22 |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
23 typedef struct PyModuleDef_Base { |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
24 PyObject_HEAD |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
25 PyObject* (*m_init)(void); |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
26 Py_ssize_t m_index; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
27 PyObject* m_copy; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
28 } PyModuleDef_Base; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
29 |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
30 #define PyModuleDef_HEAD_INIT {PyObject_HEAD_INIT(NULL)} |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
31 |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
32 typedef struct PyModuleDef{ |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
33 PyModuleDef_Base m_base; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
34 const char* m_name; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
35 const char* m_doc; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
36 Py_ssize_t m_size; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
37 PyMethodDef *m_methods; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
38 inquiry m_reload; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
39 traverseproc m_traverse; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
40 inquiry m_clear; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
41 freefunc m_free; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
42 }PyModuleDef; |
|
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44351
diff
changeset
|
43 |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
44 |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
45 #ifdef __cplusplus |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
46 } |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
47 #endif |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1257
diff
changeset
|
48 #endif /* !Py_MODULEOBJECT_H */ |
