pyRXP.c: fix some warnings about types py33
authorrobin
Sat, 23 Nov 2013 13:19:40 +0000
branchpy33
changeset 23 e20b6b75f64c
parent 22 d1a26617d06b
child 24 2ae638a3dbc7
pyRXP.c: fix some warnings about types
src/pyRXP.c
--- a/src/pyRXP.c	Mon Nov 18 13:56:58 2013 +0000
+++ b/src/pyRXP.c	Sat Nov 23 13:19:40 2013 +0000
@@ -833,7 +833,7 @@
 	Char		*r=NULL;
 	Py_ssize_t	sz;
 	int			err, ir;
-	unsigned char	*s;
+	const char	*s;
 
 	if(pd->ugeCB==Py_None) return r;
 	uname = PyUnicode_DecodeUTF16((const char *)name, (Py_ssize_t)(sizeof(Char)*namelen), NULL, &g_byteorder);
@@ -855,7 +855,7 @@
 			if(PyUnicode_Check(result)){
 				bytes=PyUnicode_AsEncodedString(result, g_encname, "strict");
 				if(bytes){
-					err = PyBytes_AsStringAndSize(bytes,&s,&sz);
+					err = PyBytes_AsStringAndSize(bytes,(char **)&s,&sz);
 					if(!err){
 						/*at last we got a bunch of bytes in our encoding*/
 						r = (Char*)Malloc(sz+sizeof(Char));