[Python-Dev] A Hygienic Macro System in Python?

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


python-dev@python.org

-----Original Message-----
From: Barry Scott [mailto:barry.alan.scott@ntlworld.com] 
Sent: 02 April 2002 02:09
To: martin@v.loewis.de
Subject: RE: [Python-Dev] A Hygienic Macro System in Python?


Martin,

I'm quoting against the 2.1 code base. My code works against 2.2,
but I'm sure these macros will break my code in mysterios ways in
the future.

My app is embedding Python within it.

You can see my code in Python CXX connection on sourceforge.

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.

The INCREF/DECREF family cannot be used and worse these change
definition on various #ifdef's, which I have to supply matching
implementations for to allow debug vs. release builds.

If you only use functions from the python DLL then delay loading can be
used on windows. But there are all those unencapsulated variables
that prevent this in a not trival app. They need a Get/Set interface.

		BArry


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


"Barry Scott" <barry.alan.scott@ntlworld.com> writes:

> I need to be able to dynamically load python in my
> application. Python integration is optional. I can look use the
> GetProcAddress to get a real functions, but I have to know the
> implementation inside the macros and duplicate that code. If there
> are a pure procedural interface it would be a lot easier for my type
> of app.

Which macros would you like to avoid specifically?

Regards,
Martin