Fix undefined sumbol in Python 3
`PyInt_FromLong` was renamed to `PyLong_FromLong` in Python 3. A macro has been added to fix this.
This commit is contained in:
@@ -84,7 +84,7 @@ md = Markdown(BleepRenderer(),
|
||||
EXT_STRIKETHROUGH | EXT_SUPERSCRIPT)
|
||||
|
||||
|
||||
print(md.render(u'''
|
||||
print(md.render('''
|
||||
Unordered
|
||||
|
||||
- One
|
||||
|
||||
@@ -40,8 +40,14 @@
|
||||
}
|
||||
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
#define FromLongToPyLong(i) PyLong_FromLong(i)
|
||||
#else
|
||||
#define FromLongToPyLong(i) PyInt_FromLong(i)
|
||||
#endif
|
||||
|
||||
#define PY_STR(b) (b != NULL ? Py_BuildValue("s#", b->data, (int) b->size) : Py_None)
|
||||
#define PY_INT(i) PyInt_FromLong(i)
|
||||
#define PY_INT(i) FromLongToPyLong(i)
|
||||
|
||||
|
||||
/* Block level
|
||||
|
||||
Reference in New Issue
Block a user