1991-02-19 13:39:46 +01:00
|
|
|
|
1990-10-14 13:07:46 +01:00
|
|
|
/* Module object interface */
|
|
|
|
|
2000-07-09 02:55:06 +02:00
|
|
|
#ifndef Py_MODULEOBJECT_H
|
|
|
|
#define Py_MODULEOBJECT_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2002-08-12 09:21:58 +02:00
|
|
|
PyAPI_DATA(PyTypeObject) PyModule_Type;
|
1990-10-14 13:07:46 +01:00
|
|
|
|
2001-09-10 20:21:59 +02:00
|
|
|
#define PyModule_Check(op) PyObject_TypeCheck(op, &PyModule_Type)
|
2007-12-19 03:45:37 +01:00
|
|
|
#define PyModule_CheckExact(op) (Py_TYPE(op) == &PyModule_Type)
|
1990-10-14 13:07:46 +01:00
|
|
|
|
2005-12-10 19:50:16 +01:00
|
|
|
PyAPI_FUNC(PyObject *) PyModule_New(const char *);
|
2002-08-12 09:21:58 +02:00
|
|
|
PyAPI_FUNC(PyObject *) PyModule_GetDict(PyObject *);
|
2007-08-26 04:21:42 +02:00
|
|
|
PyAPI_FUNC(const char *) PyModule_GetName(PyObject *);
|
|
|
|
PyAPI_FUNC(const char *) PyModule_GetFilename(PyObject *);
|
2010-08-18 01:37:11 +02:00
|
|
|
PyAPI_FUNC(PyObject *) PyModule_GetFilenameObject(PyObject *);
|
2002-08-12 09:21:58 +02:00
|
|
|
PyAPI_FUNC(void) _PyModule_Clear(PyObject *);
|
2008-06-11 07:26:20 +02:00
|
|
|
PyAPI_FUNC(struct PyModuleDef*) PyModule_GetDef(PyObject*);
|
|
|
|
PyAPI_FUNC(void*) PyModule_GetState(PyObject*);
|
|
|
|
|
|
|
|
typedef struct PyModuleDef_Base {
|
|
|
|
PyObject_HEAD
|
|
|
|
PyObject* (*m_init)(void);
|
|
|
|
Py_ssize_t m_index;
|
|
|
|
PyObject* m_copy;
|
|
|
|
} PyModuleDef_Base;
|
|
|
|
|
|
|
|
#define PyModuleDef_HEAD_INIT {PyObject_HEAD_INIT(NULL)}
|
|
|
|
|
|
|
|
typedef struct PyModuleDef{
|
|
|
|
PyModuleDef_Base m_base;
|
|
|
|
const char* m_name;
|
|
|
|
const char* m_doc;
|
|
|
|
Py_ssize_t m_size;
|
|
|
|
PyMethodDef *m_methods;
|
|
|
|
inquiry m_reload;
|
|
|
|
traverseproc m_traverse;
|
|
|
|
inquiry m_clear;
|
|
|
|
freefunc m_free;
|
|
|
|
}PyModuleDef;
|
|
|
|
|
1993-07-28 11:05:47 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_MODULEOBJECT_H */
|