Update of /cvsroot/ctypes/ctypes/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16043
Modified Files:
_ctypes.c
Log Message:
Simplify code, improve error handling, and a Py_ssize_t fix by Neal Norwitz.
Index: _ctypes.c
===================================================================
RCS file: /cvsroot/ctypes/ctypes/source/_ctypes.c,v
retrieving revision 1.319
retrieving revision 1.320
diff -C2 -d -r1.319 -r1.320
*** _ctypes.c 5 Apr 2006 12:41:31 -0000 1.319
--- _ctypes.c 6 Apr 2006 11:30:53 -0000 1.320
***************
*** 1285,1289 ****
PyObject *swapped_args;
static PyObject *suffix;
! int i;
swapped_args = PyTuple_New(PyTuple_GET_SIZE(args));
--- 1285,1289 ----
PyObject *swapped_args;
static PyObject *suffix;
! Py_ssize_t i;
swapped_args = PyTuple_New(PyTuple_GET_SIZE(args));
***************
*** 1298,1303 ****
#endif
! Py_INCREF(suffix);
! PyString_ConcatAndDel(&name, suffix);
PyTuple_SET_ITEM(swapped_args, 0, name);
--- 1298,1304 ----
#endif
! PyString_Concat(&name, suffix);
! if (name == NULL)
! return NULL;
PyTuple_SET_ITEM(swapped_args, 0, name);
|