> No one's undefying PY_SSIZE_T_CLEAN in Python.h. Why? =)
>
> There are two different functions one for int length and the other for
> Py_ssize_t. We define PY_SSIZE_T_CLEAN and that would work with implicit
> linking (through linker flags, -lpython), because preprocessor conditionally
> replaces one for the other in modsupport.h, but we need to handle that
> ourselves with explicit linking, namely dlsym _PyArg_ParseTuple_SizeT instead
> of PyArg_ParseTuple from libpython.so.
Yes. But you must do this or your patch just adds a bunch of conditions
#if 0 /* Originally #ifndef PY_SSIZE_T_CLEAN */
/* Import int function variants */
#else
/* Import Py_ssize_t function variants */
#endif
. Don’t you think having “#if 0”-like conditions is strange? You should
undefine PY_SSIZE_T_CLEAN based on some conditions, remove one of the branches
or replace “#ifndef” with what makes more sense.
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php