comparison setup.py @ 545:6501fe0e116c

Build the speedup C-extension against the stable API. This is done by emulating PyUnicode_New()/PyUnicode_WriteChar() with encoding the UCS4 character to UTF-8 and using PyUnicode_FromStringAndSize().
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 01 Jan 2022 20:36:46 +0100
parents f71d34dda19f
children adf65c31f8fc
comparison
equal deleted inserted replaced
544:db2d108e14e7 545:6501fe0e116c
55 55
56 if (platform.python_implementation() == "CPython" 56 if (platform.python_implementation() == "CPython"
57 and (sys.version_info[0] > 3 57 and (sys.version_info[0] > 3
58 or (sys.version_info[0] == 3 and sys.version_info[1] >= 7))): 58 or (sys.version_info[0] == 3 and sys.version_info[1] >= 7))):
59 59
60 py_limited_api = False 60 py_limited_api = True
61 61
62 if py_limited_api: 62 if py_limited_api:
63 define_macros = [("Py_LIMITED_API", "0x03070000")] 63 define_macros = [("Py_LIMITED_API", "0x03070000")]
64 else: 64 else:
65 define_macros = [] 65 define_macros = []