source: vendor/python/2.5/Include/import.h

Last change on this file was 3225, checked in by bird, 18 years ago

Python 2.5

File size: 2.0 KB
Line 
1
2/* Module definition and import interface */
3
4#ifndef Py_IMPORT_H
5#define Py_IMPORT_H
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10PyAPI_FUNC(long) PyImport_GetMagicNumber(void);
11PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule(char *name, PyObject *co);
12PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleEx(
13 char *name, PyObject *co, char *pathname);
14PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void);
15PyAPI_FUNC(PyObject *) PyImport_AddModule(const char *name);
16PyAPI_FUNC(PyObject *) PyImport_ImportModule(const char *name);
17PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel(char *name,
18 PyObject *globals, PyObject *locals, PyObject *fromlist, int level);
19
20/* For DLL compatibility */
21#undef PyImport_ImportModuleEx
22PyAPI_FUNC(PyObject *) PyImport_ImportModuleEx(
23 char *name, PyObject *globals, PyObject *locals, PyObject *fromlist);
24#define PyImport_ImportModuleEx(n, g, l, f) \
25 PyImport_ImportModuleLevel(n, g, l, f, -1)
26
27PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name);
28PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m);
29PyAPI_FUNC(void) PyImport_Cleanup(void);
30PyAPI_FUNC(int) PyImport_ImportFrozenModule(char *);
31
32PyAPI_FUNC(struct filedescr *) _PyImport_FindModule(
33 const char *, PyObject *, char *, size_t, FILE **, PyObject **);
34PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr *);
35PyAPI_FUNC(void) _PyImport_ReInitLock(void);
36
37PyAPI_FUNC(PyObject *)_PyImport_FindExtension(char *, char *);
38PyAPI_FUNC(PyObject *)_PyImport_FixupExtension(char *, char *);
39
40struct _inittab {
41 char *name;
42 void (*initfunc)(void);
43};
44
45PyAPI_DATA(struct _inittab *) PyImport_Inittab;
46
47PyAPI_FUNC(int) PyImport_AppendInittab(char *name, void (*initfunc)(void));
48PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
49
50struct _frozen {
51 char *name;
52 unsigned char *code;
53 int size;
54};
55
56/* Embedding apps may change this pointer to point to their favorite
57 collection of frozen modules: */
58
59PyAPI_DATA(struct _frozen *) PyImport_FrozenModules;
60
61#ifdef __cplusplus
62}
63#endif
64#endif /* !Py_IMPORT_H */
Note: See TracBrowser for help on using the repository browser.