[Python-Dev] Improvements for Porting C Extension from 2 to 3

Sümer Cip sumerc at gmail.com
Thu Mar 3 10:06:20 CET 2011


Hi,

While porting a C extension from 2 to 3, I realized that there are some
general cases which can be automated. For example, for my specific
application (yappi - http://code.google.com/p/yappi/), all I need to do is
following things:

1) define PyModuleDef
2) change PyString_AS_STRING calls  to _PyUnicode_AsString
3) change module init code a little.

It occurred to me all these kind of standart changes can be automated via a
script.

Not sure on the usability of this however, because of my limited knowledge
on the area.

Does such a tool worth being implemented?

-- 
Sumer Cip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20110303/0475d01b/attachment.html>


More information about the Python-Dev mailing list