summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-07-27 04:41:00 (GMT)
committerGuido van Rossum <guido@python.org>2007-07-27 04:41:00 (GMT)
commitf7a94e4b44f2e5d565864ac784071efb35569161 (patch)
treea999efa04b5fb726df2551ae8e57a4fe1a4064b7 /Python
parent67feb09d065aee7a125b226c0249c4db37a1f4f4 (diff)
downloadcpython-f7a94e4b44f2e5d565864ac784071efb35569161.zip
cpython-f7a94e4b44f2e5d565864ac784071efb35569161.tar.gz
cpython-f7a94e4b44f2e5d565864ac784071efb35569161.tar.bz2
SF patch# 1761465 by Jeffrey Yasskin.
Fix test_aepack and test_applesingle.
Diffstat (limited to 'Python')
-rw-r--r--Python/mactoolboxglue.c4
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);