diff options
author | Thomas Heller <theller@ctypes.org> | 2009-01-08 09:34:20 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2009-01-08 09:34:20 (GMT) |
commit | 5e4e4278c9ddec1d143962a53de653442a61f443 (patch) | |
tree | 0a46d3bd00b4abd3683973dfd4f667da5cbc8575 /Modules | |
parent | 2f947369b37c8f16f882a9c426245193a1801bbd (diff) | |
download | cpython-5e4e4278c9ddec1d143962a53de653442a61f443.zip cpython-5e4e4278c9ddec1d143962a53de653442a61f443.tar.gz cpython-5e4e4278c9ddec1d143962a53de653442a61f443.tar.bz2 |
Fixed a crash in ctypes, when HAVE_USABLE_WCHAR_T is false.
Fixes issue #4867.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/callproc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 0f9f511..bf0de88 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -645,8 +645,8 @@ static int ConvParam(PyObject *obj, Py_ssize_t index, struct argument *pa) #ifdef CTYPES_UNICODE if (PyUnicode_Check(obj)) { -#ifdef HAVE_USABLE_WCHAR_T pa->ffi_type = &ffi_type_pointer; +#ifdef HAVE_USABLE_WCHAR_T pa->value.p = PyUnicode_AS_UNICODE(obj); Py_INCREF(obj); pa->keep = obj; |