[issue4805] Make python code compilable with a C++ compiler

2012-12-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue4805] Make python code compilable with a C++ compiler

2012-11-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list

[issue4805] Make python code compilable with a C++ compiler

2010-07-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue4805] Make python code compilable with a C++ compiler

2010-07-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.2 -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4805] Make python code compilable with a C++ compiler

2009-01-06 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-01-05 22:06, Alexander Belopolsky wrote: > Alexander Belopolsky added the comment: >> Given that you can build Python as library on Unix and as DLL on >> Windows, there doesn't appear to be any need to actually be able >> to build Python itself usin

[issue4805] Make python code compilable with a C++ compiler

2009-01-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Jan 5, 2009 at 2:58 PM, Marc-Andre Lemburg wrote: .. > For completeness, all exported symbols in Python should have a _Py_ > prefix, even if they only get exported in certain debug builds. > I actually agree, but I felt that doing this as a part o

[issue4805] Make python code compilable with a C++ compiler

2009-01-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-01-05 19:55, Alexander Belopolsky wrote: > The allocs counters (tuple_zero_allocs, fast_tuple_allocs, > quick_int_allocs, quick_neg_int_allocs) present a case where it is > really hard to justify a change that is only motivated by C++ > compilability

[issue4805] Make python code compilable with a C++ compiler

2009-01-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Jan 5, 2009 at 11:43 AM, Marc-Andre Lemburg wrote: .. >> GCC doesn't appear to do so, but there's no guarantee that other >> C++ compilers won't touch these symbols: >> >> http://en.wikipedia.org/wiki/Name_mangling > > Issue #4846 is a good exampl

[issue4805] Make python code compilable with a C++ compiler

2009-01-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-01-05 13:03, Marc-Andre Lemburg wrote: > Marc-Andre Lemburg added the comment: > > On 2009-01-03 04:38, Alexander Belopolsky wrote: >> Alexander Belopolsky added the comment: >> >> On Fri, Jan 2, 2009 at 10:54 AM, Marc-Andre Lemburg >> wrote: >>>

[issue4805] Make python code compilable with a C++ compiler

2009-01-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-01-03 04:38, Alexander Belopolsky wrote: > Alexander Belopolsky added the comment: > > On Fri, Jan 2, 2009 at 10:54 AM, Marc-Andre Lemburg > wrote: >> Marc-Andre Lemburg added the comment: >> >> Also note that by removing the extern "C" declarati

[issue4805] Make python code compilable with a C++ compiler

2009-01-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file12530/c++-patch-1.diff ___ Python tracker ___ ___ Python-bugs-list m

[issue4805] Make python code compilable with a C++ compiler

2009-01-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file12560/c++-patch-2.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue4805] Make python code compilable with a C++ compiler

2009-01-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Jan 2, 2009 at 10:54 AM, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > Also note that by removing the extern "C" declarations, you not only > change the exported symbol names of functions, but also those of > exported gl

[issue4805] Make python code compilable with a C++ compiler

2009-01-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The added type casts are useful to have - even outside the context of the idea behind the patch. ___ Python tracker ___ _

[issue4805] Make python code compilable with a C++ compiler

2009-01-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Also note that by removing the extern "C" declarations, you not only change the exported symbol names of functions, but also those of exported globals. Those would also have to get declared in the header files, to prevent their names from being mangled (cau

[issue4805] Make python code compilable with a C++ compiler

2009-01-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Moving declarations into header files is not really in line with the way Python developers use header files: We usually only put code into header files that is meant for public use. Buy putting declarations into the header files without additional warning

[issue4805] Make python code compilable with a C++ compiler

2009-01-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: A related question discussed on python-dev is whether extern "C" {} wrappers should ever be used in .c files. I argue that the answer is "no" even if C++ compilability is desired. The new patch eliminates several uses of extern "C" {} in .c files while

[issue4805] Make python code compilable with a C++ compiler

2009-01-01 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : I am posting this patch mainly to support python-dev discussion on this topic. In the past (see r45330) it was possible to compile python core and standard library modules using a C++ compiler. According to Martin v. Löwis (issue4665), "It's not a re