[issue4846] Py_UNICODE_ISSPACE causes linker error

2009-01-05 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: Actually, providing the patch for PyAPI_Data/PyAPI_Func wouldn't be so hard, but there are lots of headers that need to be changed, i.e. all their existing extern "C" clauses removed. What I would do is build the Python shared library as it is and then use e

[issue4846] Py_UNICODE_ISSPACE causes linker error

2009-01-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-01-05 18:54, Alexander Belopolsky wrote: > I also wonder whether it would be more appropriate to redefine PyAPI_* > macros to declare API symbols with extern "C" when compiled under C++? > This seems to be a better approach than cluttering all hea

[issue4846] Py_UNICODE_ISSPACE causes linker error

2009-01-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Fixed in r68344 on trunk. Backport and forward-port candidate. -- keywords: +26backport -patch status: open -> closed versions: +Python 2.7 ___ Python tracker

[issue4846] Py_UNICODE_ISSPACE causes linker error

2009-01-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Not that it would matter on a two-line patch, but I find it useful to add myself to the "nosy" list without any comments as so as I find the issue interesting even if I have nothing to contribute at the moment. This way I am more likely to notice when some

[issue4846] Py_UNICODE_ISSPACE causes linker error

2009-01-05 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: You beat me by 10 minutes, Alexander, otherwise I'd have had a similar patch, except moving the declaration. I agree with your rationale though, so yours is even better. Concerning including the extern "C" in the PyAPI_* macros, I had the same idea and think t

[issue4846] Py_UNICODE_ISSPACE causes linker error

2009-01-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I believe attached issue4846.diff should fix the problem, but I don't have access to the affected platform (Windows?), so I did not test it. I also wonder whether it would be more appropriate to redefine PyAPI_* macros to declare API symbols with extern

[issue4846] Py_UNICODE_ISSPACE causes linker error

2009-01-05 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue4846] Py_UNICODE_ISSPACE causes linker error

2009-01-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-01-05 17:09, Atsuo Ishimoto wrote: > New submission from Atsuo Ishimoto : > > When I use Py_UNICODE_ISSPACE() in my C++ extension, I got following error. > > test.obj : error LNK2019: unresolved external symbol > "__declspec(dllimport) unsigned cha

[issue4846] Py_UNICODE_ISSPACE causes linker error

2009-01-05 Thread Atsuo Ishimoto
New submission from Atsuo Ishimoto : When I use Py_UNICODE_ISSPACE() in my C++ extension, I got following error. test.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned char const * const _Py_ascii_whitespace" (__imp_?_Py_ascii_whitespace@@3QBEB) referenced in functi