python extend c++ module
lists at cheimes.de
Mon Jun 29 07:30:52 EDT 2009
> I found it's quite strange when compiling. I didn't use extern "C" at all
> , how can python get the right c++ funciton name without any compile error??
> I found that it first use gcc to compile noddy3.cpp and then link by g++.
> Could anyone explain what it's all about?
The Python header files already contain the necessary extern "C"
declarations. You can safely import the Python.h header file in a cpp
file without an extern "C" block.
More information about the Python-list