pombreda / llvm-py

Automatically exported from code.google.com/p/llvm-py
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Patch to add support for python 3.x #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The attached patch against trunk (rev 85) adds support to compile llvm-py
extension with python 3.x.

Change includes:
- replacement usage of string with unicode in C API
- use PyBytes API in 3.x and PyString API in 2.x to deal with bytes array
(module bitcode)
- extension module initialization change using
http://docs.python.org/dev/3.0/howto/cporting.html#cporting-howto as
guide-line.
- change python example to use open built-in instead of file constructor
(no longer supported in 3.x)
- change python example to use either a bytestream or a strstream

Original issue reported on code.google.com by baptiste...@gmail.com on 26 Dec 2009 at 9:14

Attachments:

GoogleCodeExporter commented 9 years ago
Forgot this notes:
The patch also requires running the 2to3 tool to update python sources (mostly 
print
statement change) in the top-directory:
c:\Python31\Tools\Scripts\2to3.py . -w

Original comment by baptiste...@gmail.com on 26 Dec 2009 at 9:18