source: trunk/include/python2.4/import.h @ 490

Last change on this file since 490 was 88, checked in by cxsong, 19 years ago

copied from /opt/rappture/include

File size: 1.6 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(char *name);
16PyAPI_FUNC(PyObject *) PyImport_ImportModule(char *name);
17PyAPI_FUNC(PyObject *) PyImport_ImportModuleEx(
18        char *name, PyObject *globals, PyObject *locals, PyObject *fromlist);
19PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name);
20PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m);
21PyAPI_FUNC(void) PyImport_Cleanup(void);
22PyAPI_FUNC(int) PyImport_ImportFrozenModule(char *);
23
24PyAPI_FUNC(struct filedescr *) _PyImport_FindModule(
25        const char *, PyObject *, char *, size_t, FILE **, PyObject **);
26PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr *);
27
28PyAPI_FUNC(PyObject *)_PyImport_FindExtension(char *, char *);
29PyAPI_FUNC(PyObject *)_PyImport_FixupExtension(char *, char *);
30
31struct _inittab {
32    char *name;
33    void (*initfunc)(void);
34};
35
36PyAPI_DATA(struct _inittab *) PyImport_Inittab;
37
38PyAPI_FUNC(int) PyImport_AppendInittab(char *name, void (*initfunc)(void));
39PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
40
41struct _frozen {
42    char *name;
43    unsigned char *code;
44    int size;
45};
46
47/* Embedding apps may change this pointer to point to their favorite
48   collection of frozen modules: */
49
50PyAPI_DATA(struct _frozen *) PyImport_FrozenModules;
51
52#ifdef __cplusplus
53}
54#endif
55#endif /* !Py_IMPORT_H */
Note: See TracBrowser for help on using the repository browser.