Last set of CW Pro 5 projects (probably)
[python/dscho.git] / Include / import.h
blobc11d33e1c1192bf0771584c24ae3b0a18884bd47
1 /***********************************************************
2 Copyright (c) 2000, BeOpen.com.
3 Copyright (c) 1995-2000, Corporation for National Research Initiatives.
4 Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
5 All rights reserved.
7 See the file "Misc/COPYRIGHT" for information on usage and
8 redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
9 ******************************************************************/
11 /* Module definition and import interface */
13 #ifndef Py_IMPORT_H
14 #define Py_IMPORT_H
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
19 DL_IMPORT(long) PyImport_GetMagicNumber(void);
20 DL_IMPORT(PyObject *) PyImport_ExecCodeModule(char *name, PyObject *co);
21 DL_IMPORT(PyObject *) PyImport_ExecCodeModuleEx(
22 char *name, PyObject *co, char *pathname);
23 DL_IMPORT(PyObject *) PyImport_GetModuleDict(void);
24 DL_IMPORT(PyObject *) PyImport_AddModule(char *name);
25 DL_IMPORT(PyObject *) PyImport_ImportModule(char *name);
26 DL_IMPORT(PyObject *) PyImport_ImportModuleEx(
27 char *name, PyObject *globals, PyObject *locals, PyObject *fromlist);
28 DL_IMPORT(PyObject *) PyImport_Import(PyObject *name);
29 DL_IMPORT(PyObject *) PyImport_ReloadModule(PyObject *m);
30 DL_IMPORT(void) PyImport_Cleanup(void);
31 DL_IMPORT(int) PyImport_ImportFrozenModule(char *);
33 extern DL_IMPORT(PyObject *)_PyImport_FindExtension(char *, char *);
34 extern DL_IMPORT(PyObject *)_PyImport_FixupExtension(char *, char *);
36 struct _inittab {
37 char *name;
38 void (*initfunc)(void);
41 extern DL_IMPORT(struct _inittab *) PyImport_Inittab;
43 extern DL_IMPORT(int) PyImport_AppendInittab(char *name, void (*initfunc)(void));
44 extern DL_IMPORT(int) PyImport_ExtendInittab(struct _inittab *newtab);
46 struct _frozen {
47 char *name;
48 unsigned char *code;
49 int size;
52 /* Embedding apps may change this pointer to point to their favorite
53 collection of frozen modules: */
55 extern DL_IMPORT(struct _frozen *) PyImport_FrozenModules;
57 #ifdef __cplusplus
59 #endif
60 #endif /* !Py_IMPORT_H */