mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
SF patch# 1761465 by Jeffrey Yasskin.
Fix test_aepack and test_applesingle.
This commit is contained in:
parent
67feb09d06
commit
f7a94e4b44
7 changed files with 126 additions and 104 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue