New Python development process (SourceForge considered Harmful?)

jay.krell at cornell.edu jay.krell at cornell.edu
Thu Oct 5 14:11:41 EDT 2000


>In case anyone cares, the extension type example in file xxobject.c has the
>following code:
>static PyTypeObject Xxtype = { PyObject_HEAD_INIT(&PyType_Type) ...
>But PyType_Type isn't a constant here (it is exported from the Python DLL),
>so it should just be NULL here, and should be updated from the module
>initializatin.

If the data stored was a function pointer instead of a pointer to data, it'd
be "constant enough" (you actually get a level 4 warning about "identity not
guaranteed")... ie: if Python.dll did not export any data..

Optimization tip: making stuff "const static" lets it remain readonly and
shared across processes, which is good. If it doesn't get relocated. Making
it null and finishing the initialization later moves it to writable data.

So ideally it'd be const static and contain the address of a function.

 - Jay

-----Original Message-----
From: Tom <nospam at nospam.com>
Newsgroups: comp.lang.python
To: python-list at python.org <python-list at python.org>
Date: Thursday, October 05, 2000 10:42 AM
Subject: Re: New Python development process (SourceForge considered
Harmful?)
...





More information about the Python-list mailing list