[Python-checkins] r43148 - python/trunk/Mac/Modules/cf/_CFmodule.c

neal.norwitz python-checkins at python.org
Mon Mar 20 03:04:24 CET 2006


Author: neal.norwitz
Date: Mon Mar 20 03:04:23 2006
New Revision: 43148

Modified:
   python/trunk/Mac/Modules/cf/_CFmodule.c
Log:
Get rid of some warnings.

Modified: python/trunk/Mac/Modules/cf/_CFmodule.c
==============================================================================
--- python/trunk/Mac/Modules/cf/_CFmodule.c	(original)
+++ python/trunk/Mac/Modules/cf/_CFmodule.c	Mon Mar 20 03:04:23 2006
@@ -1329,7 +1329,7 @@
 	if (v == Py_None) { *p_itself = NULL; return 1; }
 	if (PyString_Check(v)) {
 	    char *cStr;
-	    int cLen;
+	    Py_ssize_t cLen;
 	    if( PyString_AsStringAndSize(v, &cStr, &cLen) < 0 ) return 0;
 	    *p_itself = CFDataCreate((CFAllocatorRef)NULL, (unsigned char *)cStr, cLen);
 	    return 1;
@@ -1826,7 +1826,7 @@
 	if (PyString_Check(v)) {
 	    char *cStr;
 	    if (!PyArg_Parse(v, "es", "ascii", &cStr))
-	        return NULL;
+	        return 0;
 	        *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII);
 	        return 1;
 	}


More information about the Python-checkins mailing list