niner / inline-python-pm

Inline::Python - Write Perl subs and classes in Python.
https://metacpan.org/release/Inline-Python
20 stars 13 forks source link

Prepare for Python3 compatibility #5

Closed lmazuel closed 10 years ago

lmazuel commented 10 years ago

Hi,

In this commit, you'll find all the stuffs I had to do to be compliant at the same time with the C Python 3 API and the C Python 2 API, but without using a "#if PY_MAJOR_VERSION == 3" hack. This means:

In addition, few Py_DECREF/Py_XDECREF was missing.

Tested on Ubuntu 14.04 with Python 2.5.6, 2.6.9 and 2.7.6

niner commented 10 years ago

Hi! I fixed some white space issues in your commit and pushed the amended commit.

Many thanks for the great work! Please let me know when you're done so I can publish a new release with your changes.