We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6ece3a commit 5f43731Copy full SHA for 5f43731
1 file changed
Mac/Modules/cf/_CFmodule.c
@@ -1329,7 +1329,7 @@ int CFDataRefObj_Convert(PyObject *v, CFDataRef *p_itself)
1329
if (v == Py_None) { *p_itself = NULL; return 1; }
1330
if (PyString_Check(v)) {
1331
char *cStr;
1332
- int cLen;
+ Py_ssize_t cLen;
1333
if( PyString_AsStringAndSize(v, &cStr, &cLen) < 0 ) return 0;
1334
*p_itself = CFDataCreate((CFAllocatorRef)NULL, (unsigned char *)cStr, cLen);
1335
return 1;
@@ -1826,7 +1826,7 @@ int CFStringRefObj_Convert(PyObject *v, CFStringRef *p_itself)
1826
1827
1828
if (!PyArg_Parse(v, "es", "ascii", &cStr))
1829
- return NULL;
+ return 0;
1830
*p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII);
1831
1832
}
0 commit comments