Commit 6598c579 authored by Guido van Rossum's avatar Guido van Rossum

Minor fixes / changes for Mac compatibility.

parent 7829d195
...@@ -156,7 +156,7 @@ imageop_tovideo(self, args) ...@@ -156,7 +156,7 @@ imageop_tovideo(self, args)
ncp = (unsigned char *)getstringvalue(rv); ncp = (unsigned char *)getstringvalue(rv);
if ( width == 1 ) { if ( width == 1 ) {
bcopy(cp, ncp, maxx); /* Copy first line */ memcpy(ncp, cp, maxx); /* Copy first line */
ncp += maxx; ncp += maxx;
for (y=1; y<maxy; y++) { /* Interpolate other lines */ for (y=1; y<maxy; y++) { /* Interpolate other lines */
for(x=0; x<maxx; x++) { for(x=0; x<maxx; x++) {
...@@ -165,7 +165,7 @@ imageop_tovideo(self, args) ...@@ -165,7 +165,7 @@ imageop_tovideo(self, args)
} }
} }
} else { } else {
bcopy(cp, ncp, maxx*4); /* Copy first line */ memcpy(ncp, cp, maxx*4); /* Copy first line */
ncp += maxx*4; ncp += maxx*4;
for (y=1; y<maxy; y++) { /* Interpolate other lines */ for (y=1; y<maxy; y++) { /* Interpolate other lines */
for(x=0; x<maxx; x++) { for(x=0; x<maxx; x++) {
......
...@@ -763,7 +763,7 @@ dictinsert(v, key, item) ...@@ -763,7 +763,7 @@ dictinsert(v, key, item)
last_name_object = newstringobject(key); last_name_object = newstringobject(key);
if (last_name_object == NULL) { if (last_name_object == NULL) {
last_name_char = NULL; last_name_char = NULL;
return NULL; return -1;
} }
last_name_char = key; last_name_char = key;
} }
...@@ -780,7 +780,7 @@ dictremove(v, key) ...@@ -780,7 +780,7 @@ dictremove(v, key)
last_name_object = newstringobject(key); last_name_object = newstringobject(key);
if (last_name_object == NULL) { if (last_name_object == NULL) {
last_name_char = NULL; last_name_char = NULL;
return NULL; return -1;
} }
last_name_char = key; last_name_char = key;
} }
......
...@@ -442,7 +442,7 @@ setlistslice(a, ilow, ihigh, v) ...@@ -442,7 +442,7 @@ setlistslice(a, ilow, ihigh, v)
{ {
if (!is_listobject(a)) { if (!is_listobject(a)) {
err_badcall(); err_badcall();
return NULL; return -1;
} }
return list_ass_slice((listobject *)a, ilow, ihigh, v); return list_ass_slice((listobject *)a, ilow, ihigh, v);
} }
......
...@@ -763,7 +763,7 @@ dictinsert(v, key, item) ...@@ -763,7 +763,7 @@ dictinsert(v, key, item)
last_name_object = newstringobject(key); last_name_object = newstringobject(key);
if (last_name_object == NULL) { if (last_name_object == NULL) {
last_name_char = NULL; last_name_char = NULL;
return NULL; return -1;
} }
last_name_char = key; last_name_char = key;
} }
...@@ -780,7 +780,7 @@ dictremove(v, key) ...@@ -780,7 +780,7 @@ dictremove(v, key)
last_name_object = newstringobject(key); last_name_object = newstringobject(key);
if (last_name_object == NULL) { if (last_name_object == NULL) {
last_name_char = NULL; last_name_char = NULL;
return NULL; return -1;
} }
last_name_char = key; last_name_char = key;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment