[Python-checkins] python/dist/src/Doc/ext noddy2.c,NONE,1.1 noddy3.c,NONE,1.1 newtypes.tex,1.21,1.22

Michael Hudson mwh@python.net
Thu, 08 May 2003 11:54:21 +0100


[Ccing python-dev because of the last paragraph]

Jim Fulton <jim@zope.com> writes:

> Michael Hudson wrote:
>> dcjim@users.sourceforge.net writes:
>> 
>>>Update of /cvsroot/python/python/dist/src/Doc/ext
>>>In directory sc8-pr-cvs1:/tmp/cvs-serv13294
>>>
>>>Modified Files:
>>> 	newtypes.tex Added Files:
>>> 	noddy2.c noddy3.c Log Message:
>>>Rewrote the basic section of the chapter on defining new types.
>> As the original author of this section, thank you!
>
> You're welcome. :)
>
> My main reason for doing this was to learn the material myself.
> (I had the luxury of sitting next to Guido as I did it and bugging
> him with questions. :)

That would help :-)

>> Do you mention anywhere that this only works for 2.2 and up?  That
>> might be an idea.
>
> OK, I'll add that in the introduction. It was *already* dependent on
> Python 2.3 due to the use of PyMODINIT_FUNC as the type of the init
> function.

Yes.  That wasn't me, and whoever changed it didn't keep the .c file
in sync with the bits of it quoted in the .tex file, grumble.

> I'm not sure why this is needed rather than void. Maybe I should change this
> so it works with Python 2.2. I'll talk to Guido and Fred about this.

The Py_MODINIT()/DL_IMPORT() thing is an annoying
incompatibility-causer ... perhaps something to deal with this could
be added to pymemcompat.h? (in which case it's misnamed...)

Cheers,
M.

-- 
  ARTHUR:  Ford, you're turning into a penguin, stop it.
                    -- The Hitch-Hikers Guide to the Galaxy, Episode 2