[PATCH 1 of 7] util.h: Utility macros for handling different Python APIs

Renato Cunha renatoc at gmail.com
Thu Jun 10 15:57:29 CDT 2010


Hello Eric,

On Thu, Jun 10, 2010 at 14:36, Eric Eisner <ede at mit.edu> wrote:
> Is there a reason that these names are in all caps to be different
> from both python2 and python3? Couldn't the #define statements be used
> to make the C code look like either python2 or python3 (preferably),
> but work under both?

I'm sorry, but I didn't quite get what you meant. My intent there was
to make it clear that what was being called were macros, not
functions. Hiding this fact by matching py3k's API might break if
someone decides to use a function that hasn't been wrapped by util.h.
Hopefully, the all caps convention can make it clear that further
adaptations should be made before using an unwrapped python
function/macro.

Regards,
-- 
Renato Cunha <http://renatocunha.com>
Blog: http://valedotrovao.com
"Whatever happens, happens"


More information about the Mercurial-devel mailing list