SF patch# 1761465 by Jeffrey Yasskin.
Fix test_aepack and test_applesingle.
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 @@
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 @@
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);