Mercurial > cpython-lru_cache-weakref
annotate Include/import.h @ 87690:66c1c9f32567 default tip
Add use_weakref option to functools.lru_cache
The use_weakref option makes lru_cache create weak references to the function
arguments when creating the cache key, which prevents them from staying in the
memory forever even after all other references to them are gone.
This is a proof of concept for http://bugs.python.org/issue19859
| author | Radomir Dopieralski <devel@sheep.art.pl> |
|---|---|
| date | Tue, 03 Dec 2013 16:02:48 +0100 |
| parents | 3055e61f1e66 |
| children |
| rev | line source |
|---|---|
| 145 | 1 |
| 6 | 2 /* Module definition and import interface */ |
| 3 | |
|
13443
7e58c060d534
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
4 #ifndef Py_IMPORT_H |
|
7e58c060d534
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
5 #define Py_IMPORT_H |
|
7e58c060d534
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
6 #ifdef __cplusplus |
|
7e58c060d534
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
7 extern "C" { |
|
7e58c060d534
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
8 #endif |
|
1198
2937897a7d8b
* Added Fixcprt.py: script to fix copyright message.
Guido van Rossum <guido@python.org>
parents:
790
diff
changeset
|
9 |
|
76303
2dd046be2c88
Issue #2377: Make importlib the implementation of __import__().
Brett Cannon <brett@python.org>
parents:
70374
diff
changeset
|
10 PyAPI_FUNC(void) _PyImportZip_Init(void); |
|
2dd046be2c88
Issue #2377: Make importlib the implementation of __import__().
Brett Cannon <brett@python.org>
parents:
70374
diff
changeset
|
11 |
|
2dd046be2c88
Issue #2377: Make importlib the implementation of __import__().
Brett Cannon <brett@python.org>
parents:
70374
diff
changeset
|
12 PyMODINIT_FUNC PyInit_imp(void); |
|
24315
a8df0c0be242
Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.
Mark Hammond <mhammond@skippinet.com.au>
parents:
14375
diff
changeset
|
13 PyAPI_FUNC(long) PyImport_GetMagicNumber(void); |
| 60648 | 14 PyAPI_FUNC(const char *) PyImport_GetMagicTag(void); |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
15 PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule( |
|
86484
3055e61f1e66
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Serhiy Storchaka <storchaka@gmail.com>
parents:
82649
diff
changeset
|
16 const char *name, /* UTF-8 encoded string */ |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
17 PyObject *co |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
18 ); |
|
24315
a8df0c0be242
Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.
Mark Hammond <mhammond@skippinet.com.au>
parents:
14375
diff
changeset
|
19 PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleEx( |
|
86484
3055e61f1e66
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Serhiy Storchaka <storchaka@gmail.com>
parents:
82649
diff
changeset
|
20 const char *name, /* UTF-8 encoded string */ |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
21 PyObject *co, |
|
86484
3055e61f1e66
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Serhiy Storchaka <storchaka@gmail.com>
parents:
82649
diff
changeset
|
22 const char *pathname /* decoded from the filesystem encoding */ |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
23 ); |
| 60648 | 24 PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleWithPathnames( |
|
86484
3055e61f1e66
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Serhiy Storchaka <storchaka@gmail.com>
parents:
82649
diff
changeset
|
25 const char *name, /* UTF-8 encoded string */ |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
26 PyObject *co, |
|
86484
3055e61f1e66
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Serhiy Storchaka <storchaka@gmail.com>
parents:
82649
diff
changeset
|
27 const char *pathname, /* decoded from the filesystem encoding */ |
|
3055e61f1e66
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Serhiy Storchaka <storchaka@gmail.com>
parents:
82649
diff
changeset
|
28 const char *cpathname /* decoded from the filesystem encoding */ |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
29 ); |
|
68229
0e7180e4c3cd
Issue #3080: Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68110
diff
changeset
|
30 PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleObject( |
|
0e7180e4c3cd
Issue #3080: Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68110
diff
changeset
|
31 PyObject *name, |
|
0e7180e4c3cd
Issue #3080: Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68110
diff
changeset
|
32 PyObject *co, |
|
0e7180e4c3cd
Issue #3080: Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68110
diff
changeset
|
33 PyObject *pathname, |
|
0e7180e4c3cd
Issue #3080: Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68110
diff
changeset
|
34 PyObject *cpathname |
|
0e7180e4c3cd
Issue #3080: Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68110
diff
changeset
|
35 ); |
|
24315
a8df0c0be242
Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.
Mark Hammond <mhammond@skippinet.com.au>
parents:
14375
diff
changeset
|
36 PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void); |
|
68229
0e7180e4c3cd
Issue #3080: Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68110
diff
changeset
|
37 PyAPI_FUNC(PyObject *) PyImport_AddModuleObject( |
|
0e7180e4c3cd
Issue #3080: Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68110
diff
changeset
|
38 PyObject *name |
|
0e7180e4c3cd
Issue #3080: Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68110
diff
changeset
|
39 ); |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
40 PyAPI_FUNC(PyObject *) PyImport_AddModule( |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
41 const char *name /* UTF-8 encoded string */ |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
42 ); |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
43 PyAPI_FUNC(PyObject *) PyImport_ImportModule( |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
44 const char *name /* UTF-8 encoded string */ |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
45 ); |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
46 PyAPI_FUNC(PyObject *) PyImport_ImportModuleNoBlock( |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
47 const char *name /* UTF-8 encoded string */ |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
48 ); |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
49 PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel( |
|
70374
a9126e8770e5
make PyImport_ImportModuleLevel's first arg const like similiar functions (closes #12173)
Benjamin Peterson <benjamin@python.org>
parents:
68739
diff
changeset
|
50 const char *name, /* UTF-8 encoded string */ |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
51 PyObject *globals, |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
52 PyObject *locals, |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
53 PyObject *fromlist, |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
54 int level |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
55 ); |
|
68739
80f4bd647695
Issue #3080: Add PyImport_ImportModuleLevelObject() function
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68714
diff
changeset
|
56 PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevelObject( |
|
80f4bd647695
Issue #3080: Add PyImport_ImportModuleLevelObject() function
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68714
diff
changeset
|
57 PyObject *name, |
|
80f4bd647695
Issue #3080: Add PyImport_ImportModuleLevelObject() function
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68714
diff
changeset
|
58 PyObject *globals, |
|
80f4bd647695
Issue #3080: Add PyImport_ImportModuleLevelObject() function
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68714
diff
changeset
|
59 PyObject *locals, |
|
80f4bd647695
Issue #3080: Add PyImport_ImportModuleLevelObject() function
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68714
diff
changeset
|
60 PyObject *fromlist, |
|
80f4bd647695
Issue #3080: Add PyImport_ImportModuleLevelObject() function
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68714
diff
changeset
|
61 int level |
|
80f4bd647695
Issue #3080: Add PyImport_ImportModuleLevelObject() function
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68714
diff
changeset
|
62 ); |
|
36712
5c36c222e7ca
SF patch #1438387, PEP 328: relative and absolute imports.
Thomas Wouters <thomas@python.org>
parents:
35999
diff
changeset
|
63 |
|
5c36c222e7ca
SF patch #1438387, PEP 328: relative and absolute imports.
Thomas Wouters <thomas@python.org>
parents:
35999
diff
changeset
|
64 #define PyImport_ImportModuleEx(n, g, l, f) \ |
|
78490
9804aec74d4a
Issue #15610: The PyImport_ImportModuleEx macro now calls
Brett Cannon <brett@python.org>
parents:
76303
diff
changeset
|
65 PyImport_ImportModuleLevel(n, g, l, f, 0) |
|
36712
5c36c222e7ca
SF patch #1438387, PEP 328: relative and absolute imports.
Thomas Wouters <thomas@python.org>
parents:
35999
diff
changeset
|
66 |
|
43897
41f7c13ef161
Merged revisions 59005-59040 via svnmerge from
Christian Heimes <christian@cheimes.de>
parents:
39584
diff
changeset
|
67 PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path); |
|
24315
a8df0c0be242
Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.
Mark Hammond <mhammond@skippinet.com.au>
parents:
14375
diff
changeset
|
68 PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name); |
|
a8df0c0be242
Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.
Mark Hammond <mhammond@skippinet.com.au>
parents:
14375
diff
changeset
|
69 PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m); |
|
a8df0c0be242
Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.
Mark Hammond <mhammond@skippinet.com.au>
parents:
14375
diff
changeset
|
70 PyAPI_FUNC(void) PyImport_Cleanup(void); |
|
68711
e7c1019b27b9
Issue #3080: Add PyImport_ImportFrozenModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68229
diff
changeset
|
71 PyAPI_FUNC(int) PyImport_ImportFrozenModuleObject( |
|
e7c1019b27b9
Issue #3080: Add PyImport_ImportFrozenModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68229
diff
changeset
|
72 PyObject *name |
|
e7c1019b27b9
Issue #3080: Add PyImport_ImportFrozenModuleObject()
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68229
diff
changeset
|
73 ); |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
74 PyAPI_FUNC(int) PyImport_ImportFrozenModule( |
|
86484
3055e61f1e66
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Serhiy Storchaka <storchaka@gmail.com>
parents:
82649
diff
changeset
|
75 const char *name /* UTF-8 encoded string */ |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
76 ); |
|
13443
7e58c060d534
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
77 |
|
66664
62b61abd02b8
Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents:
65418
diff
changeset
|
78 #ifndef Py_LIMITED_API |
|
56382
2e4d7a40c2dd
Merged revisions 75246 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
52721
diff
changeset
|
79 #ifdef WITH_THREAD |
|
2e4d7a40c2dd
Merged revisions 75246 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
52721
diff
changeset
|
80 PyAPI_FUNC(void) _PyImport_AcquireLock(void); |
|
2e4d7a40c2dd
Merged revisions 75246 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
52721
diff
changeset
|
81 PyAPI_FUNC(int) _PyImport_ReleaseLock(void); |
|
2e4d7a40c2dd
Merged revisions 75246 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
52721
diff
changeset
|
82 #else |
|
2e4d7a40c2dd
Merged revisions 75246 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
52721
diff
changeset
|
83 #define _PyImport_AcquireLock() |
|
2e4d7a40c2dd
Merged revisions 75246 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
52721
diff
changeset
|
84 #define _PyImport_ReleaseLock() 1 |
|
2e4d7a40c2dd
Merged revisions 75246 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
52721
diff
changeset
|
85 #endif |
|
2e4d7a40c2dd
Merged revisions 75246 via svnmerge from
Benjamin Peterson <benjamin@python.org>
parents:
52721
diff
changeset
|
86 |
|
35551
57f630a9de26
- Changes donated by Elemental Security to make it work on AIX 5.3
Guido van Rossum <guido@python.org>
parents:
33680
diff
changeset
|
87 PyAPI_FUNC(void) _PyImport_ReInitLock(void); |
|
33680
bcafb68ad985
SF patch #1035498: -m option to run a module as a script
Raymond Hettinger <python@rcn.com>
parents:
24420
diff
changeset
|
88 |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
89 PyAPI_FUNC(PyObject *)_PyImport_FindBuiltin( |
|
68110
44cc9ef43127
Issue #3080: Mark _PyImport_FindBuiltin() argument as constant
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68109
diff
changeset
|
90 const char *name /* UTF-8 encoded string */ |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
91 ); |
|
68712
2425717c6430
Issue #3080: Import builtins using Unicode strings
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68711
diff
changeset
|
92 PyAPI_FUNC(PyObject *)_PyImport_FindExtensionObject(PyObject *, PyObject *); |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
93 PyAPI_FUNC(int)_PyImport_FixupBuiltin( |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
94 PyObject *mod, |
|
86484
3055e61f1e66
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Serhiy Storchaka <storchaka@gmail.com>
parents:
82649
diff
changeset
|
95 const char *name /* UTF-8 encoded string */ |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
96 ); |
|
68712
2425717c6430
Issue #3080: Import builtins using Unicode strings
Victor Stinner <victor.stinner@haypocalc.com>
parents:
68711
diff
changeset
|
97 PyAPI_FUNC(int)_PyImport_FixupExtensionObject(PyObject*, PyObject *, PyObject *); |
|
5919
5da18e002b1a
Mass checkin (more to follow for other directories).
Guido van Rossum <guido@python.org>
parents:
5376
diff
changeset
|
98 |
|
3580
8e663945e174
Added decl for PyImport_Init.
Guido van Rossum <guido@python.org>
parents:
2348
diff
changeset
|
99 struct _inittab { |
|
86484
3055e61f1e66
Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Serhiy Storchaka <storchaka@gmail.com>
parents:
82649
diff
changeset
|
100 const char *name; /* ASCII encoded string */ |
|
47580
94f64f11fdd0
Implement PEP 3121: new module initialization and finalization API.
Martin v. Löwis <martin@v.loewis.de>
parents:
44441
diff
changeset
|
101 PyObject* (*initfunc)(void); |
|
3580
8e663945e174
Added decl for PyImport_Init.
Guido van Rossum <guido@python.org>
parents:
2348
diff
changeset
|
102 }; |
|
66664
62b61abd02b8
Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents:
65418
diff
changeset
|
103 PyAPI_DATA(struct _inittab *) PyImport_Inittab; |
|
62b61abd02b8
Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents:
65418
diff
changeset
|
104 PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab); |
|
62b61abd02b8
Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents:
65418
diff
changeset
|
105 #endif /* Py_LIMITED_API */ |
|
3580
8e663945e174
Added decl for PyImport_Init.
Guido van Rossum <guido@python.org>
parents:
2348
diff
changeset
|
106 |
|
43897
41f7c13ef161
Merged revisions 59005-59040 via svnmerge from
Christian Heimes <christian@cheimes.de>
parents:
39584
diff
changeset
|
107 PyAPI_DATA(PyTypeObject) PyNullImporter_Type; |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1198
diff
changeset
|
108 |
|
68109
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
109 PyAPI_FUNC(int) PyImport_AppendInittab( |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
110 const char *name, /* ASCII encoded string */ |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
111 PyObject* (*initfunc)(void) |
|
ec3c06761856
Issue #3080: document encoding used by import functions
Victor Stinner <victor.stinner@haypocalc.com>
parents:
66664
diff
changeset
|
112 ); |
|
8588
74a100cb7a64
Add PyImport_AppendInittab() an PyImport_ExtendInittab().
Guido van Rossum <guido@python.org>
parents:
7231
diff
changeset
|
113 |
|
66664
62b61abd02b8
Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents:
65418
diff
changeset
|
114 #ifndef Py_LIMITED_API |
|
3681
a527f449ca26
Add defs for struct _frozen and struct _frozen *PyImport_FrozenModules();
Guido van Rossum <guido@python.org>
parents:
3580
diff
changeset
|
115 struct _frozen { |
|
82649
a06fc2c2342a
make some freezing related stuff const
Benjamin Peterson <benjamin@python.org>
parents:
78490
diff
changeset
|
116 const char *name; /* ASCII encoded string */ |
|
a06fc2c2342a
make some freezing related stuff const
Benjamin Peterson <benjamin@python.org>
parents:
78490
diff
changeset
|
117 const unsigned char *code; |
|
13443
7e58c060d534
ANSI-fication and Py_PROTO extermination.
Fred Drake <fdrake@acm.org>
parents:
13256
diff
changeset
|
118 int size; |
|
3681
a527f449ca26
Add defs for struct _frozen and struct _frozen *PyImport_FrozenModules();
Guido van Rossum <guido@python.org>
parents:
3580
diff
changeset
|
119 }; |
|
a527f449ca26
Add defs for struct _frozen and struct _frozen *PyImport_FrozenModules();
Guido van Rossum <guido@python.org>
parents:
3580
diff
changeset
|
120 |
|
a527f449ca26
Add defs for struct _frozen and struct _frozen *PyImport_FrozenModules();
Guido van Rossum <guido@python.org>
parents:
3580
diff
changeset
|
121 /* Embedding apps may change this pointer to point to their favorite |
|
a527f449ca26
Add defs for struct _frozen and struct _frozen *PyImport_FrozenModules();
Guido van Rossum <guido@python.org>
parents:
3580
diff
changeset
|
122 collection of frozen modules: */ |
|
a527f449ca26
Add defs for struct _frozen and struct _frozen *PyImport_FrozenModules();
Guido van Rossum <guido@python.org>
parents:
3580
diff
changeset
|
123 |
|
82649
a06fc2c2342a
make some freezing related stuff const
Benjamin Peterson <benjamin@python.org>
parents:
78490
diff
changeset
|
124 PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules; |
|
66664
62b61abd02b8
Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents:
65418
diff
changeset
|
125 #endif |
|
3681
a527f449ca26
Add defs for struct _frozen and struct _frozen *PyImport_FrozenModules();
Guido van Rossum <guido@python.org>
parents:
3580
diff
changeset
|
126 |
|
1329
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1198
diff
changeset
|
127 #ifdef __cplusplus |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1198
diff
changeset
|
128 } |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1198
diff
changeset
|
129 #endif |
|
519c25039c6a
* Added support for X11 modules.
Guido van Rossum <guido@python.org>
parents:
1198
diff
changeset
|
130 #endif /* !Py_IMPORT_H */ |
