[ctypes-commit] ctypes/source _ctypes.c,1.188,1.189
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2004-11-30 19:38:19
|
Update of /cvsroot/ctypes/ctypes/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12049 Modified Files: _ctypes.c Log Message: Merging is still black art for me ;-( Indexes start at 0. Index: _ctypes.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/_ctypes.c,v retrieving revision 1.188 retrieving revision 1.189 diff -C2 -d -r1.188 -r1.189 *** _ctypes.c 30 Nov 2004 16:40:25 -0000 1.188 --- _ctypes.c 30 Nov 2004 19:38:10 -0000 1.189 *************** *** 92,100 **** #endif - #ifndef METH_CLASS - #define METH_CLASS 0x0010 /* from Python 2.3 */ - #define NO_METH_CLASS - #endif - PyObject *PyExc_ArgError; --- 92,95 ---- *************** *** 1609,1615 **** char *cp = string; int len; ! *cp++ = index + '1'; while (target->b_base) { ! *cp++ = target->b_index + '1'; target = target->b_base; } --- 1604,1610 ---- char *cp = string; int len; ! *cp++ = index + '0'; while (target->b_base) { ! *cp++ = target->b_index + '0'; target = target->b_base; } *************** *** 3560,3593 **** } - /* - * XXX What about errors ??? - */ - #ifdef NO_METH_CLASS - void DoClassMethods(PyTypeObject *type) - { - PyObject *func; - PyObject *meth; - PyMethodDef *ml = type->tp_methods; - - for (; ml->ml_name; ++ml) { - if ((ml->ml_flags & METH_CLASS) == 0) - continue; - ml->ml_flags &= ~METH_CLASS; - func = PyCFunction_New(ml, NULL); - if (!func) - return; - meth = PyObject_CallFunctionObjArgs( - (PyObject *)&PyClassMethod_Type, - func, NULL); - if (!meth) - return; - if (-1 == PyDict_SetItemString(type->tp_dict, - ml->ml_name, - meth)) - return; - } - } - #endif - static char *module_docs = "Create and manipulate C compatible data types in Python."; --- 3555,3558 ---- |