[Python-Dev] RE: [Python-Div] A Hygienic Macro System in Python?
Wed, 3 Apr 2002 12:03:44 +0100
From: Barry Scott [mailto:email@example.com]
Sent: 02 April 2002 19:34
To: firstname.lastname@example.org; email@example.com
Subject: RE: [Python-Div] A Hygienic Macro System in Python?
The problem is linking. I cannot link against python21.dll as it will not be
on all target systems. Now I can use DELAYLOAD to get at functions in macros.
But DELAYLOAD is disabled if a variable in a DLL is referenced, hence the _CHECK
problem, also some things like Py_None, Py_True and Py_False cannot be used
for the same reason.
From: firstname.lastname@example.org [mailto:email@example.com]
Sent: 02 April 2002 06:54
Subject: Re: [Python-Dev] A Hygienic Macro System in Python?
"Barry Scott" <firstname.lastname@example.org> writes:
> Consider: my code attempts to load pythonXX.dll then if it is present
> I find all the procedures that I need. I cannot use MACROS with implicit
> references to functions, it will prevent me linking my app.
> All the _Check macros cannot be used. I would like a C function.
Thanks, this is all I wanted to know. It is the _Check macros, and
INCREF, DECREF you are after. Thanks for clarifying.
I still don't understand the problem, though. For CXX, you do use the
preprocessor, right? So why can't it just expand these macros?
Furthermore, you say that you cannot use macros with implicit
references to functions. Neither the _Check macros, nor INCREF/DECREF
have implicit references to functions...