[ctypes-commit] ctypes/source cfield.c,1.51,1.52
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2004-10-12 09:43:17
|
Update of /cvsroot/ctypes/ctypes/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15673 Modified Files: cfield.c Log Message: Fix compiler warning, simplify code. Index: cfield.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/cfield.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** cfield.c 12 Oct 2004 09:36:45 -0000 1.51 --- cfield.c 12 Oct 2004 09:43:06 -0000 1.52 *************** *** 642,646 **** { int len; - wchar_t *p; if (PyString_Check(value)) { --- 642,645 ---- *************** *** 658,666 **** Py_INCREF(value); - p = PyUnicode_AsUnicode(value); - if (!p) { - Py_DECREF(value); - return NULL; - } len = PyUnicode_GET_SIZE(value); if (len != 1) { --- 657,660 ---- *************** *** 670,674 **** return NULL; } ! *(wchar_t *)ptr = p[0]; Py_DECREF(value); --- 664,669 ---- return NULL; } ! ! *(wchar_t *)ptr = PyUnicode_AS_UNICODE(value)[0]; Py_DECREF(value); |