mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix two bad type identifiers that caused crashes on OSX (icglue and Nav).
Silence two innocuous warnings (_File and _collections).
This commit is contained in:
parent
3f6dd68e2a
commit
2f2fffb766
4 changed files with 4 additions and 6 deletions
|
@ -403,8 +403,7 @@ static char Navrrtype__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyTypeObject Navrrtype = {
|
static PyTypeObject Navrrtype = {
|
||||||
PyObject_HEAD_INIT(&PyType_Type)
|
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||||
0, /*ob_size*/
|
|
||||||
"Nav.NavReplyRecord", /*tp_name*/
|
"Nav.NavReplyRecord", /*tp_name*/
|
||||||
sizeof(navrrobject), /*tp_basicsize*/
|
sizeof(navrrobject), /*tp_basicsize*/
|
||||||
0, /*tp_itemsize*/
|
0, /*tp_itemsize*/
|
||||||
|
|
|
@ -3193,7 +3193,7 @@ PyMac_GetFSRef(PyObject *v, FSRef *fsr)
|
||||||
|
|
||||||
/* On OSX we now try a pathname */
|
/* On OSX we now try a pathname */
|
||||||
if ( PyString_Check(v) || PyUnicode_Check(v)) {
|
if ( PyString_Check(v) || PyUnicode_Check(v)) {
|
||||||
char *path = NULL;
|
unsigned char *path = NULL;
|
||||||
if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
|
if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
|
||||||
return 0;
|
return 0;
|
||||||
if ( (err=FSPathMakeRef(path, fsr, NULL)) )
|
if ( (err=FSPathMakeRef(path, fsr, NULL)) )
|
||||||
|
|
|
@ -392,8 +392,7 @@ static char Icitype__doc__[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
static PyTypeObject Icitype = {
|
static PyTypeObject Icitype = {
|
||||||
PyObject_HEAD_INIT(&PyType_Type)
|
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||||
0, /*ob_size*/
|
|
||||||
"icglue.ic_instance", /*tp_name*/
|
"icglue.ic_instance", /*tp_name*/
|
||||||
sizeof(iciobject), /*tp_basicsize*/
|
sizeof(iciobject), /*tp_basicsize*/
|
||||||
0, /*tp_itemsize*/
|
0, /*tp_itemsize*/
|
||||||
|
|
|
@ -1103,7 +1103,7 @@ defdict_copy(defdictobject *dd)
|
||||||
whose class constructor has the same signature. Subclasses that
|
whose class constructor has the same signature. Subclasses that
|
||||||
define a different constructor signature must override copy().
|
define a different constructor signature must override copy().
|
||||||
*/
|
*/
|
||||||
return PyObject_CallFunctionObjArgs(Py_Type(dd),
|
return PyObject_CallFunctionObjArgs((PyObject *)Py_Type(dd),
|
||||||
dd->default_factory, dd, NULL);
|
dd->default_factory, dd, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue