]> granicus.if.org Git - python/commitdiff
Get rid of some warnings.
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 20 Mar 2006 02:04:23 +0000 (02:04 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 20 Mar 2006 02:04:23 +0000 (02:04 +0000)
Mac/Modules/cf/_CFmodule.c

index 22e9676f4eb55671be35fadc0e2986857516eb46..5f934c248ea19455a6938002dcb4e7fab45fbdb5 100644 (file)
@@ -1329,7 +1329,7 @@ int CFDataRefObj_Convert(PyObject *v, CFDataRef *p_itself)
        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 @@ int CFStringRefObj_Convert(PyObject *v, CFStringRef *p_itself)
        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;
        }