From 1301394264a8790dc5b9f2d72fb9326d51d4228b Mon Sep 17 00:00:00 2001 From: konstin Date: Fri, 15 Jun 2018 15:57:59 +0200 Subject: [PATCH] Fix c string conversion in python 2 --- src/ffi2/objectabstract.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ffi2/objectabstract.rs b/src/ffi2/objectabstract.rs index c43d7dfb..f4471af5 100644 --- a/src/ffi2/objectabstract.rs +++ b/src/ffi2/objectabstract.rs @@ -295,15 +295,15 @@ pub unsafe fn PyMapping_DelItem(o : *mut PyObject, key : *mut PyObject) -> c_int #[inline] pub unsafe fn PyMapping_Keys(o : *mut PyObject) -> *mut PyObject { - PyObject_CallMethod(o, "keys\0".as_ptr() as *mut u8, ptr::null_mut()) + PyObject_CallMethod(o, "keys\0".as_ptr() as *mut c_char, ptr::null_mut()) } #[inline] pub unsafe fn PyMapping_Values(o : *mut PyObject) -> *mut PyObject { - PyObject_CallMethod(o, "values\0".as_ptr() as *mut u8, ptr::null_mut()) + PyObject_CallMethod(o, "values\0".as_ptr() as *mut c_char, ptr::null_mut()) } #[inline] pub unsafe fn PyMapping_Items(o : *mut PyObject) -> *mut PyObject { - PyObject_CallMethod(o, "items\0".as_ptr() as *mut u8, ptr::null_mut()) + PyObject_CallMethod(o, "items\0".as_ptr() as *mut c_char, ptr::null_mut()) }