A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-January/084689.html below:

[Python-Dev] #ifdef __cplusplus?

[Python-Dev] #ifdef __cplusplus?Alexander Belopolsky alexander.belopolsky at gmail.com
Fri Jan 2 03:18:53 CET 2009
The relevant revision is r45330:
<http://svn.python.org/view?rev=45330&view=rev>.

"""
Author:	anthony.baxter
Date:	Thu Apr 13 02:06:09 2006 UTC (2 years, 8 months ago)
Log Message:
spread the extern "C" { } magic pixie dust around. Python itself builds now
using a C++ compiler. Still lots and lots of errors in the modules built by
setup.py, and a bunch of warnings from g++ in the core.
"""

Wrapping code inside .c files in  extern "C" { }  strikes me as a lazy
solution.  It is likely that g++ warnings that were silenced by that
change were indicative of either functions not declared in headers
missing "static" keyword or .c files not including relevant headers.

If OP has energy to investigate this issue further, it would be
interesting to revert  r45330 and recompile python with CC=g++.



On Thu, Jan 1, 2009 at 6:54 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Ulrich Eckhardt wrote:
>> Hi!
>>
>> There are lots of files that are framed with an extern "C" stanza when
>> compiled under C++. Now, I appreciate that header files are made suitable for
>> use with C++ with that, but WTF are those doing in .c files???
>
> I believe it is to allow building the Python source as an embedded part
> of an external application that is built with a C++ compiler, even when
> that compiler isn't clever enough to realise that the 'extern "C"'
> should be implied by the '.c' file extension.
>
> I didn't add those lines though - I suggest doing an SVN annotate on
> some of the affected source files, and looking at the associated checkin
> comments.
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> ---------------------------------------------------------------
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/alexander.belopolsky%40gmail.com
>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4