diff options
author | Thomas Heller <theller@ctypes.org> | 2007-07-12 19:33:24 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2007-07-12 19:33:24 (GMT) |
commit | 3d79dd9edf3cfdffd1dc7d4e45b77da2478e1111 (patch) | |
tree | 3aa3b3524b83c1467ba9000fbc1b5bb6d158d14e /Modules | |
parent | 7a76e8f67c0866d04c7370df580bcd7b0cb42297 (diff) | |
download | cpython-3d79dd9edf3cfdffd1dc7d4e45b77da2478e1111.zip cpython-3d79dd9edf3cfdffd1dc7d4e45b77da2478e1111.tar.gz cpython-3d79dd9edf3cfdffd1dc7d4e45b77da2478e1111.tar.bz2 |
c_char_p.from_param accepts bytes. Fix test_parameters.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index bab1e35..d6a435d 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -1183,7 +1183,7 @@ c_char_p_from_param(PyObject *type, PyObject *value) Py_INCREF(Py_None); return Py_None; } - if (PyString_Check(value) || PyUnicode_Check(value)) { + if (PyBytes_Check(value) || PyUnicode_Check(value)) { PyCArgObject *parg; struct fielddesc *fd = getentry("z"); |