Author: guido.van.rossum
Date: Wed Jul 25 18:47:51 2007
New Revision: 56546

Modified:
   python/branches/py3k-struni/Mac/Modules/Nav.c
   python/branches/py3k-struni/Mac/Modules/file/_Filemodule.c
   python/branches/py3k-struni/Mac/Modules/icgluemodule.c
   python/branches/py3k-struni/Modules/_collectionsmodule.c
Log:
Fix two bad type identifiers that caused crashes on OSX (icglue and Nav).
Silence two innocuous warnings (_File and _collections).


Modified: python/branches/py3k-struni/Mac/Modules/Nav.c
==============================================================================
--- python/branches/py3k-struni/Mac/Modules/Nav.c       (original)
+++ python/branches/py3k-struni/Mac/Modules/Nav.c       Wed Jul 25 18:47:51 2007
@@ -403,8 +403,7 @@
 ;
 
 static PyTypeObject Navrrtype = {
-       PyObject_HEAD_INIT(&PyType_Type)
-       0,                              /*ob_size*/
+       PyVarObject_HEAD_INIT(&PyType_Type, 0)
        "Nav.NavReplyRecord",                   /*tp_name*/
        sizeof(navrrobject),            /*tp_basicsize*/
        0,                              /*tp_itemsize*/

Modified: python/branches/py3k-struni/Mac/Modules/file/_Filemodule.c
==============================================================================
--- python/branches/py3k-struni/Mac/Modules/file/_Filemodule.c  (original)
+++ python/branches/py3k-struni/Mac/Modules/file/_Filemodule.c  Wed Jul 25 
18:47:51 2007
@@ -3193,7 +3193,7 @@
 
         /* On OSX we now try a pathname */
         if ( PyString_Check(v) || PyUnicode_Check(v)) {
-                char *path = NULL;
+                unsigned char *path = NULL;
                 if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
                         return 0;
                 if ( (err=FSPathMakeRef(path, fsr, NULL)) )

Modified: python/branches/py3k-struni/Mac/Modules/icgluemodule.c
==============================================================================
--- python/branches/py3k-struni/Mac/Modules/icgluemodule.c      (original)
+++ python/branches/py3k-struni/Mac/Modules/icgluemodule.c      Wed Jul 25 
18:47:51 2007
@@ -392,8 +392,7 @@
 ;
 
 static PyTypeObject Icitype = {
-       PyObject_HEAD_INIT(&PyType_Type)
-       0,                              /*ob_size*/
+       PyVarObject_HEAD_INIT(&PyType_Type, 0)
        "icglue.ic_instance",           /*tp_name*/
        sizeof(iciobject),              /*tp_basicsize*/
        0,                              /*tp_itemsize*/

Modified: python/branches/py3k-struni/Modules/_collectionsmodule.c
==============================================================================
--- python/branches/py3k-struni/Modules/_collectionsmodule.c    (original)
+++ python/branches/py3k-struni/Modules/_collectionsmodule.c    Wed Jul 25 
18:47:51 2007
@@ -1103,7 +1103,7 @@
           whose class constructor has the same signature.  Subclasses that
           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);
 }
 
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to