A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-December/031534.html below:

[Python-Dev] RE: [Python-checkins] python/dist/src/Modules _randommodule.c,1.1,1.2

[Python-Dev] RE: [Python-checkins] python/dist/src/Modules _randommodule.c,1.1,1.2Tim Peters tim.one@comcast.net
Tue, 31 Dec 2002 17:14:17 -0500
[nnorwitz@users.sourceforge.net]
> Modified Files:
> 	_randommodule.c
> Log Message:
> Try to get compilation working for cygwin
>
> Index: _randommodule.c

And then, for example, before:

> ! 	PyObject_GenericGetAttr,	/*tp_getattro*/

and after:

> ! 	0,				/*tp_getattro*/

followed by:

> + 	Random_Type.tp_getattro = PyObject_GenericGetAttr;
> + 	Random_Type.tp_alloc = PyType_GenericAlloc;
> + 	Random_Type.tp_free = _PyObject_Del;

in the module init function.

Please don't make this kind of change -- it makes the code so much harder to
follow.  If this is needed for Cygwin, then, e.g., do

#define DEFERRED(x) 0 /* some boxes can't resolve addresses at compile-time
*/

and make the "after" line

     DEFERRED(PyObject_GenericGetAttr), /*tp_getattro*/

IOW, the type slots should be readable on their own, as a static unit.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4