[ctypes-commit] ctypes/source _ctypes_test.c,1.33,1.34
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2004-10-19 09:09:12
|
Update of /cvsroot/ctypes/ctypes/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1409 Modified Files: _ctypes_test.c Log Message: Mixing ctypes exported function calls and Python functions in _ctypes_test didn't work too well, on OS X at least. It seems several instances of the _ctypes_test extension got loaded, and we could not retrieve the correct value from the last function calls. Index: _ctypes_test.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/_ctypes_test.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** _ctypes_test.c 13 Oct 2004 19:05:40 -0000 1.33 --- _ctypes_test.c 19 Oct 2004 09:08:53 -0000 1.34 *************** *** 288,305 **** } ! PY_LONG_LONG last_tf_arg_s; ! unsigned PY_LONG_LONG last_tf_arg_u; ! ! PyObject * ! get_last_tf_arg_s(PyObject *self, PyObject *arg) ! { ! return PyLong_FromLongLong(last_tf_arg_s); ! } ! ! PyObject * ! get_last_tf_arg_u(PyObject *self, PyObject *arg) ! { ! return PyLong_FromUnsignedLongLong(last_tf_arg_u); ! } struct BITS { --- 288,293 ---- } ! EXPORT(PY_LONG_LONG) last_tf_arg_s; ! EXPORT(unsigned PY_LONG_LONG) last_tf_arg_u; struct BITS { *************** *** 356,361 **** PyMethodDef module_methods[] = { ! {"get_last_tf_arg_s", get_last_tf_arg_s, METH_NOARGS}, ! {"get_last_tf_arg_u", get_last_tf_arg_u, METH_NOARGS}, {"func_si", py_func_si, METH_VARARGS}, {"func", py_func, METH_NOARGS}, --- 344,349 ---- PyMethodDef module_methods[] = { ! // {"get_last_tf_arg_s", get_last_tf_arg_s, METH_NOARGS}, ! // {"get_last_tf_arg_u", get_last_tf_arg_u, METH_NOARGS}, {"func_si", py_func_si, METH_VARARGS}, {"func", py_func, METH_NOARGS}, |