[Python-Dev] (PyMapping|PyDict|PyObject)_DelItemString [was: [Pythonmac-SIG] pyobjc.so ]

Steven Majewski sdm7g@Virginia.EDU
Fri, 18 Jan 2002 14:52:18 -0500 (EST)


[ Background note for cc: to python-dev:
  pyobjc.so builds under both python2.1.2 and python2.2.
  It works under 2.1.2, but under 2.2, it gives a
  'Failure linking new module' error. ]


Added a call to NSLinkEditError to get back more info from
the error (I'll submit this as a patch to SF after I clean
it up a bit.):


>>> import pyobjc
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: dyld: /usr/local/src/Python-2.2/python.exe Undefined symbols:
_PyObject_DelItemString
Failure linking new module
>>>

grepping for this in 2.1.2 finds nothing.

In 2.2, there seems to be one occurance:

 grep PyObject_DelItemString */*.[ch]
Include/abstract.h:#define PyMapping_DelItemString(O,K)  PyObject_DelItemString((O),(K))

Searching for PyMapping_DelItemString, it looks like this changed from
PyDict_DelItemString() in 2.1.2 to PyObject_DelItemString() in 2.2:

dm7g% grep PyMapping_DelItemString Python-2.*/*/*.[ch]
Python-2.1.2/Include/abstract.h:     int PyMapping_DelItemString(PyObject *o, char *key);
Python-2.1.2/Include/abstract.h:#define PyMapping_DelItemString(O,K) PyDict_DelItemString((O),(K))
Python-2.2/Include/abstract.h:     int PyMapping_DelItemString(PyObject *o, char *key);
Python-2.2/Include/abstract.h:#define PyMapping_DelItemString(O,K) PyObject_DelItemString((O),(K))


Is this change of name an inadvertant bug, or is it something that
was intentionally changed, but incompletely?


-- Steve