import.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef Py_CPYTHON_IMPORT_H
  2. # error "this header file must not be included directly"
  3. #endif
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. PyMODINIT_FUNC PyInit__imp(void);
  8. PyAPI_FUNC(int) _PyImport_IsInitialized(PyInterpreterState *);
  9. PyAPI_FUNC(PyObject *) _PyImport_GetModuleId(struct _Py_Identifier *name);
  10. PyAPI_FUNC(int) _PyImport_SetModule(PyObject *name, PyObject *module);
  11. PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module);
  12. PyAPI_FUNC(void) _PyImport_AcquireLock(void);
  13. PyAPI_FUNC(int) _PyImport_ReleaseLock(void);
  14. PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *);
  15. PyAPI_FUNC(int) _PyImport_FixupBuiltin(
  16. PyObject *mod,
  17. const char *name, /* UTF-8 encoded string */
  18. PyObject *modules
  19. );
  20. PyAPI_FUNC(int) _PyImport_FixupExtensionObject(PyObject*, PyObject *,
  21. PyObject *, PyObject *);
  22. struct _inittab {
  23. const char *name; /* ASCII encoded string */
  24. PyObject* (*initfunc)(void);
  25. };
  26. PyAPI_DATA(struct _inittab *) PyImport_Inittab;
  27. PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
  28. struct _frozen {
  29. const char *name; /* ASCII encoded string */
  30. const unsigned char *code;
  31. int size;
  32. };
  33. /* Embedding apps may change this pointer to point to their favorite
  34. collection of frozen modules: */
  35. PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules;
  36. #ifdef __cplusplus
  37. }
  38. #endif