summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-20 02:04:23 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-20 02:04:23 (GMT)
commitc3264e50e741ccac19f949ff87803f576b5a4918 (patch)
treec0e1897e114da31ca0ab3f36e810eaaed304a1f8 /Mac
parentd5b0c9b87edca68cd31ed61d0c143d9d4160c109 (diff)
downloadcpython-c3264e50e741ccac19f949ff87803f576b5a4918.zip
cpython-c3264e50e741ccac19f949ff87803f576b5a4918.tar.gz
cpython-c3264e50e741ccac19f949ff87803f576b5a4918.tar.bz2
Get rid of some warnings.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/cf/_CFmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mac/Modules/cf/_CFmodule.c b/Mac/Modules/cf/_CFmodule.c
index 22e9676..5f934c2 100644
--- a/Mac/Modules/cf/_CFmodule.c
+++ b/Mac/Modules/cf/_CFmodule.c
@@ -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;
}