This repository has been archived by the owner on Nov 12, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ce3d8a
commit 7aff611
Showing
4 changed files
with
73 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Compatibility changes for compiling against Python 3.x */ | ||
|
||
#if PY_MAJOR_VERSION >= 3 | ||
#define IS_PY3K | ||
#define Py_TPFLAGS_HAVE_ITER 0 | ||
#define PyInt_FromLong PyLong_FromLong | ||
#define PyString_FromString PyUnicode_FromString | ||
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3 | ||
#define PyString_AsString(STR) PyUnicode_AsUTF8((STR)) | ||
#else | ||
/* XXX reference leak below */ | ||
#define PyString_AsString(STR) PyBytes_AsString(PyUnicode_AsUTF8String((STR))) | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters