diff options
Diffstat (limited to 'Python/mactoolboxglue.c')
-rw-r--r-- | Python/mactoolboxglue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/mactoolboxglue.c b/Python/mactoolboxglue.c index 85acb51..0714cff 100644 --- a/Python/mactoolboxglue.c +++ b/Python/mactoolboxglue.c @@ -194,7 +194,7 @@ PyObject * PyMac_BuildOSType(OSType t) { uint32_t tmp = htonl((uint32_t)t); - return PyString_FromStringAndSize((char *)&tmp, 4); + return PyBytes_FromStringAndSize((char *)&tmp, 4); } /* Convert an NumVersion value to a 4-element tuple */ @@ -215,7 +215,7 @@ PyMac_GetStr255(PyObject *v, Str255 pbuf) if (PyUnicode_Check(v)) { v = _PyUnicode_AsDefaultEncodedString(v, NULL); if (v == NULL) - return NULL; + return 0; } if (PyString_Check(v)) { ptr = PyString_AS_STRING(v); |