2 /* Module definition and import interface */
10 PyAPI_FUNC(long) PyImport_GetMagicNumber(void);
11 PyAPI_FUNC(PyObject
*) PyImport_ExecCodeModule(char *name
, PyObject
*co
);
12 PyAPI_FUNC(PyObject
*) PyImport_ExecCodeModuleEx(
13 char *name
, PyObject
*co
, char *pathname
);
14 PyAPI_FUNC(PyObject
*) PyImport_GetModuleDict(void);
15 PyAPI_FUNC(PyObject
*) PyImport_AddModule(const char *name
);
16 PyAPI_FUNC(PyObject
*) PyImport_ImportModule(const char *name
);
17 PyAPI_FUNC(PyObject
*) PyImport_ImportModuleNoBlock(const char *);
18 PyAPI_FUNC(PyObject
*) PyImport_ImportModuleLevel(char *name
,
19 PyObject
*globals
, PyObject
*locals
, PyObject
*fromlist
, int level
);
21 #define PyImport_ImportModuleEx(n, g, l, f) \
22 PyImport_ImportModuleLevel(n, g, l, f, -1)
24 PyAPI_FUNC(PyObject
*) PyImport_GetImporter(PyObject
*path
);
25 PyAPI_FUNC(PyObject
*) PyImport_Import(PyObject
*name
);
26 PyAPI_FUNC(PyObject
*) PyImport_ReloadModule(PyObject
*m
);
27 PyAPI_FUNC(void) PyImport_Cleanup(void);
28 PyAPI_FUNC(int) PyImport_ImportFrozenModule(char *);
31 PyAPI_FUNC(void) _PyImport_AcquireLock(void);
32 PyAPI_FUNC(int) _PyImport_ReleaseLock(void);
34 #define _PyImport_AcquireLock()
35 #define _PyImport_ReleaseLock() 1
38 PyAPI_FUNC(struct filedescr
*) _PyImport_FindModule(
39 const char *, PyObject
*, char *, size_t, FILE **, PyObject
**);
40 PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr
*);
41 PyAPI_FUNC(void) _PyImport_ReInitLock(void);
43 PyAPI_FUNC(PyObject
*)_PyImport_FindExtension(char *, char *);
44 PyAPI_FUNC(int)_PyImport_FixupExtension(PyObject
*, char *, char *);
48 PyObject
* (*initfunc
)(void);
51 PyAPI_DATA(PyTypeObject
) PyNullImporter_Type
;
52 PyAPI_DATA(struct _inittab
*) PyImport_Inittab
;
54 PyAPI_FUNC(int) PyImport_AppendInittab(const char *name
, PyObject
* (*initfunc
)(void));
55 PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab
*newtab
);
63 /* Embedding apps may change this pointer to point to their favorite
64 collection of frozen modules: */
66 PyAPI_DATA(struct _frozen
*) PyImport_FrozenModules
;
71 #endif /* !Py_IMPORT_H */