summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2009-02-10 18:46:11 (GMT)
committerThomas Heller <theller@ctypes.org>2009-02-10 18:46:11 (GMT)
commit07750565c99849a4b3963a40e39541b5ae91f5d0 (patch)
treee83eac0c516764bf74180d35c8d1c0e3d3b27db4 /Modules/_ctypes
parent5e050d857e548dbd68b1adae420ea17f463548c1 (diff)
downloadcpython-07750565c99849a4b3963a40e39541b5ae91f5d0.zip
cpython-07750565c99849a4b3963a40e39541b5ae91f5d0.tar.gz
cpython-07750565c99849a4b3963a40e39541b5ae91f5d0.tar.bz2
Merged revisions 69505 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69505 | thomas.heller | 2009-02-10 19:43:01 +0100 (Di, 10 Feb 2009) | 3 lines Issue#5203: ctypes segfaults when passing a unicode string to a function without argtypes, if HAVE_USABLE_WCHAR_T is false. ........
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/callproc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 7f7d641..8988c12 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -664,6 +664,7 @@ static int ConvParam(PyObject *obj, Py_ssize_t index, struct argument *pa)
return 0;
#else
int size = PyUnicode_GET_SIZE(obj);
+ pa->ffi_type = &ffi_type_pointer;
size += 1; /* terminating NUL */
size *= sizeof(wchar_t);
pa->value.p = PyMem_Malloc(size);