[Python-Dev] RE: [Python-Div] A Hygienic Macro System in Python?

Barry Scott barry@barrys-emacs.org
Wed, 3 Apr 2002 12:03:44 +0100

-----Original Message-----
From: Barry Scott [mailto:barry.alan.scott@ntlworld.com] 
Sent: 02 April 2002 19:34
To: martin@v.loewis.de; barry@barrys-emacs.org
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.


-----Original Message-----
From: martin@v.loewis.de [mailto:martin@v.loewis.de]
Sent: 02 April 2002 06:54
To: barry@barrys-emacs.org
Subject: Re: [Python-Dev] A Hygienic Macro System in Python?

"Barry Scott" <barry.alan.scott@ntlworld.com> 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...