Update of /cvsroot/mahogany/M/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5484/include
Modified Files:
MPython.h
Log Message:
added symbols used in the code generated by swig 1.3.28 (might be not present
in python < 2.4, to be tested...)
Index: MPython.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MPython.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -b -u -2 -r1.18 -r1.19
--- MPython.h 16 Jan 2006 03:39:57 -0000 1.18
+++ MPython.h 30 Mar 2006 02:22:19 -0000 1.19
@@ -68,5 +68,5 @@
type M_name_t for this function which is used elsewhere.
- This macro mshould be followed by a semicolon.
+ This macro should be followed by a semicolon.
@param rettype the return type of the function
@@ -82,5 +82,5 @@
Same as M_PY_WRAPPER_DECL but for a variable.
- This macro mshould be followed by a semicolon.
+ This macro should be followed by a semicolon.
@param type type of the variable
@@ -109,10 +109,14 @@
// objects
M_PY_WRAPPER_DECL(PyObject *, PyObject_Init, (PyObject *, PyTypeObject *));
+ M_PY_WRAPPER_DECL(PyObject *, PyObject_Call, (PyObject *, PyObject *,
PyObject *));
M_PY_WRAPPER_DECL(PyObject *, PyObject_CallFunction, (PyObject *, char
*format, ...));
+ M_PY_WRAPPER_DECL(PyObject *, PyObject_CallFunctionObjArgs, (PyObject *,
...));
M_PY_WRAPPER_DECL(PyObject *, PyObject_CallObject, (PyObject *, PyObject
*));
+ M_PY_WRAPPER_DECL(PyObject *, PyObject_GenericGetAttr, (PyObject *,
PyObject *));
M_PY_WRAPPER_DECL(PyObject *, PyObject_GetAttr, (PyObject *, PyObject *));
M_PY_WRAPPER_DECL(PyObject *, PyObject_GetAttrString, (PyObject *, char *));
- M_PY_WRAPPER_DECL(void *, PyObject_Malloc, (size_t));
+ M_PY_WRAPPER_DECL(int, PyObject_IsTrue, (PyObject *));
M_PY_WRAPPER_DECL(void , PyObject_Free, (void *));
+ M_PY_WRAPPER_DECL(void *, PyObject_Malloc, (size_t));
M_PY_WRAPPER_DECL(int , PyObject_SetAttrString, (PyObject *, char *,
PyObject *));
M_PY_WRAPPER_DECL(int , PyObject_Size, (PyObject *));
@@ -120,4 +124,10 @@
M_PY_WRAPPER_DECL(void *, PyCObject_Import, (char *module_name, char
*cobject_name));
M_PY_WRAPPER_DECL(PyObject *, PyCObject_FromVoidPtr, (void *cobj, void
(*destruct)(void*)));
+ M_PY_WRAPPER_DECL(PyObject **, _PyObject_GetDictPtr, (PyObject *));
+
+ // instances
+ M_PY_WRAPPER_DECL(PyObject *, PyInstance_NewRaw, (PyObject *, PyObject *));
+ M_PY_WRAPPER_DECL(PyObject *, _PyInstance_Lookup, (PyObject *, PyObject *));
+ M_PY_VAR_DECL(PyTypeObject *, PyInstance_Type);
// ints and longs
@@ -136,4 +146,5 @@
M_PY_WRAPPER_DECL(char *, PyString_AsString, (PyObject *));
M_PY_WRAPPER_DECL(int , PyString_AsStringAndSize, (PyObject *, char **, int
*));
+ M_PY_WRAPPER_DECL(void, PyString_ConcatAndDel, (PyObject **, PyObject *));
M_PY_WRAPPER_DECL(PyObject *, PyString_Format, (PyObject *, PyObject *));
M_PY_WRAPPER_DECL(PyObject *, PyString_FromString, (const char *));
@@ -148,11 +159,21 @@
M_PY_WRAPPER_DECL(PyObject *, PyTuple_GetItem, (PyObject *, int));
M_PY_WRAPPER_DECL(int *, PyTuple_SetItem, (PyObject *, int, PyObject *));
+ M_PY_VAR_DECL(PyTypeObject * , PyTuple_Type);
+
+ // dicts
+ M_PY_WRAPPER_DECL(PyObject *, PyDict_GetItem, (PyObject *mp, PyObject
*key));
+ M_PY_WRAPPER_DECL(PyObject*, PyDict_GetItemString, (PyObject *, const char
*));
+ M_PY_WRAPPER_DECL(PyObject *, PyDict_New, (void));
+ M_PY_WRAPPER_DECL(int, PyDict_SetItem, (PyObject *mp, PyObject *key,
PyObject *item));
+ M_PY_WRAPPER_DECL(int, PyDict_SetItemString, (PyObject *dp, char *key,
PyObject *item));
+
+ // arguments
+ M_PY_WRAPPER_DECL(int, PyArg_Parse, (PyObject *, char *, ...));
+ M_PY_WRAPPER_DECL(int, PyArg_ParseTuple, (PyObject *, char *, ...));
+ M_PY_WRAPPER_DECL(int, PyArg_UnpackTuple, (PyObject *, char *, int, int,
...));
// other misc functions
M_PY_WRAPPER_DECL(PyObject* , Py_VaBuildValue, (char *, va_list));
M_PY_WRAPPER_DECL(void , _Py_Dealloc, (PyObject *));
- M_PY_WRAPPER_DECL(int, PyArg_Parse, (PyObject *, char *, ...));
- M_PY_WRAPPER_DECL(int, PyArg_ParseTuple, (PyObject *, char *, ...));
- M_PY_WRAPPER_DECL(int, PyDict_SetItemString, (PyObject *dp, char *key,
PyObject *item));
M_PY_WRAPPER_DECL(void, PyEval_RestoreThread, (PyThreadState *));
M_PY_WRAPPER_DECL(PyThreadState*, PyEval_SaveThread, (void));
@@ -163,5 +184,4 @@
M_PY_VAR_DECL(PyTypeObject* , PyList_Type);
M_PY_WRAPPER_DECL(PyObject*, PyImport_ImportModule, (const char *));
- M_PY_WRAPPER_DECL(PyObject*, PyDict_GetItemString, (PyObject *, const char
*));
M_PY_WRAPPER_DECL(PyObject*, PyModule_GetDict, (PyObject *));
M_PY_WRAPPER_DECL(int, PyModule_AddObject, (PyObject *, char *, PyObject
*));
@@ -182,15 +202,31 @@
M_PY_WRAPPER_DECL(void , _Py_NegativeRefcount, (const char *fname, int
lineno, PyObject *op));
+ // types
+ M_PY_VAR_DECL(PyTypeObject *, PyBaseObject_Type);
+ M_PY_VAR_DECL(PyTypeObject *, PyClass_Type);
+ M_PY_VAR_DECL(PyTypeObject *, PyCFunction_Type);
+ M_PY_VAR_DECL(PyTypeObject *, PyModule_Type);
+ M_PY_VAR_DECL(PyTypeObject *, _PyWeakref_CallableProxyType);
+ M_PY_VAR_DECL(PyTypeObject *, _PyWeakref_ProxyType);
+
// variables
M_PY_VAR_DECL(long, _Py_RefTotal);
- M_PY_VAR_DECL(PyTypeObject *, PyModule_Type);
M_PY_VAR_DECL(PyObject *, _Py_NoneStruct);
M_PY_VAR_DECL(PyObject *, _Py_NotImplementedStruct);
- M_PY_VAR_DECL(PyTypeObject *, PyCFunction_Type);
// exception objects
+ M_PY_VAR_DECL(PyObject *, PyExc_AttributeError);
+ M_PY_VAR_DECL(PyObject *, PyExc_IOError);
+ M_PY_VAR_DECL(PyObject *, PyExc_IndexError);
+ M_PY_VAR_DECL(PyObject *, PyExc_MemoryError);
M_PY_VAR_DECL(PyObject *, PyExc_NameError);
M_PY_VAR_DECL(PyObject *, PyExc_NotImplementedError);
+ M_PY_VAR_DECL(PyObject *, PyExc_OverflowError);
+ M_PY_VAR_DECL(PyObject *, PyExc_RuntimeError);
+ M_PY_VAR_DECL(PyObject *, PyExc_SyntaxError);
+ M_PY_VAR_DECL(PyObject *, PyExc_SystemError);
M_PY_VAR_DECL(PyObject *, PyExc_TypeError);
+ M_PY_VAR_DECL(PyObject *, PyExc_ValueError);
+ M_PY_VAR_DECL(PyObject *, PyExc_ZeroDivisionError);
#undef M_PY_VAR_DECL
@@ -215,8 +251,12 @@
// objects
#define PyObject_Init M_PyObject_Init
+#define PyObject_Call M_PyObject_Call
#define PyObject_CallFunction M_PyObject_CallFunction
+#define PyObject_CallFunctionObjArgs M_PyObject_CallFunctionObjArgs
#define PyObject_CallObject M_PyObject_CallObject
+#define PyObject_GenericGetAttr M_PyObject_GenericGetAttr
#define PyObject_GetAttr M_PyObject_GetAttr
#define PyObject_GetAttrString M_PyObject_GetAttrString
+#define PyObject_IsTrue M_PyObject_IsTrue
#if defined(WITH_PYMALLOC) && defined(PYMALLOC_DEBUG)
#define _PyObject_DebugMalloc M_PyObject_Malloc
@@ -231,4 +271,10 @@
#define PyCObject_Import M_PyCObject_Import
#define PyCObject_FromVoidPtr M_PyCObject_FromVoidPtr
+#define _PyObject_GetDictPtr M__PyObject_GetDictPtr
+
+// instances
+#define PyInstance_NewRaw M_PyInstance_NewRaw
+#define _PyInstance_Lookup M__PyInstance_Lookup
+#define PyInstance_Type (*M_PyInstance_Type)
// ints and longs
@@ -247,4 +293,5 @@
#define PyString_AsString M_PyString_AsString
#define PyString_AsStringAndSize M_PyString_AsStringAndSize
+#define PyString_ConcatAndDel M_PyString_ConcatAndDel
#define PyString_Format M_PyString_Format
#define PyString_FromString M_PyString_FromString
@@ -258,4 +305,25 @@
#define PyTuple_GetItem M_PyTuple_GetItem
#define PyTuple_SetItem M_PyTuple_SetItem
+#define PyTuple_Type (*M_PyTuple_Type)
+
+// dicts
+#define PyDict_GetItem M_PyDict_GetItem
+#define PyDict_GetItemString M_PyDict_GetItemString
+#define PyDict_New M_PyDict_New
+#define PyDict_SetItem M_PyDict_SetItem
+#define PyDict_SetItemString M_PyDict_SetItemString
+
+// arguments
+#define PyArg_Parse M_PyArg_Parse
+#define PyArg_ParseTuple M_PyArg_ParseTuple
+#define PyArg_UnpackTuple M_PyArg_UnpackTuple
+
+// types: these are objects and not function pointers
+#define PyBaseObject_Type (*M_PyBaseObject_Type)
+#define PyClass_Type (*M_PyClass_Type)
+#define PyCFunction_Type (*M_PyCFunction_Type)
+#define PyModule_Type (*M_PyModule_Type)
+#define _PyWeakref_CallableProxyType (*M__PyWeakref_CallableProxyType)
+#define _PyWeakref_ProxyType (*M__PyWeakref_ProxyType)
// ...
@@ -265,9 +333,4 @@
#define Py_VaBuildValue M_Py_VaBuildValue
#define _Py_RefTotal M__Py_RefTotal
-#define PyModule_Type (*M_PyModule_Type)
-#define PyArg_Parse M_PyArg_Parse
-#define PyArg_ParseTuple M_PyArg_ParseTuple
-#define PyDict_GetItemString M_PyDict_GetItemString
-#define PyDict_SetItemString M_PyDict_SetItemString
#define PyImport_ImportModule M_PyImport_ImportModule
#define PyModule_GetDict M_PyModule_GetDict
@@ -283,7 +346,17 @@
// exception objects
+#define PyExc_AttributeError M_PyExc_AttributeError
+#define PyExc_IOError M_PyExc_IOError
+#define PyExc_IndexError M_PyExc_IndexError
+#define PyExc_MemoryError M_PyExc_MemoryError
#define PyExc_NameError M_PyExc_NameError
#define PyExc_NotImplementedError M_PyExc_NotImplementedError
+#define PyExc_OverflowError M_PyExc_OverflowError
+#define PyExc_RuntimeError M_PyExc_RuntimeError
+#define PyExc_SyntaxError M_PyExc_SyntaxError
+#define PyExc_SystemError M_PyExc_SystemError
#define PyExc_TypeError M_PyExc_TypeError
+#define PyExc_ValueError M_PyExc_ValueError
+#define PyExc_ZeroDivisionError M_PyExc_ZeroDivisionError
// Python 2.3+
@@ -291,9 +364,4 @@
#define _Py_NegativeRefcount M__Py_NegativeRefcount
-// special cases
-
-// PyCFunction_Type is an object and not a pointer
-#define PyCFunction_Type (*M_PyCFunction_Type)
-
// _Py_Dealloc may be defined as a macro or not (in debug builds)
#ifndef _Py_Dealloc
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates