[PATCH 0 of 6] Port of hg's C modules to py3k
Renato Cunha
renatoc at gmail.com
Tue Jun 8 20:31:02 UTC 2010
Hi Michael,
On Tue, Jun 08, 2010 at 03:24:07PM -0400, Michael Tharp wrote:
> I wrote some macros to ease the transition without having nearly as
> many #ifdef/#else/#endif blocks, maybe you can borrow some ideas:
>
> http://hg.rpath.com/rmake-2.0/file/fe7aaf43bc5e/rmake/lib/pycompat.h
>
> The most useful bits are probably the PYBYTES_Foo macros which
> switch between PyString and PyBytes as appropriate. There's also
> PYMODULE_DECLARE which takes care of much of the (varying)
> boilerplate in creating a module, and the less ambitious
> PYMODULE_INIT/CREATE/RETURN which PYMODULE_DECLARE is built from.
That's definitely a good source of inspiration. Thanks!
Regards,
--
Renato Cunha <http://renatocunha.com>
Blog: http://valedotrovao.com
"Whatever happens, happens"
More information about the Mercurial-devel
mailing list