diff options
author | Catalin Iacob <iacobcatalin@gmail.com> | 2010-05-16 12:38:15 +0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-06-23 17:26:36 -0300 |
commit | 9d11979a31f55f91086373764508faaaf15ad73c (patch) | |
tree | 1ef06096e0b79d03dc36c9391dfc4b55a2dd9943 /cppgenerator.cpp | |
parent | 516bdb49bbfdbd5ff916c1c5aa3997e830818933 (diff) |
Don't use PyAPI_FUNC in cpp files.
Using it leads to MSVC error:
C2491 definition of dllimport function not allowed
This is because dllimport should only be specified when declaring
a function not when defining it.
Diffstat (limited to 'cppgenerator.cpp')
-rw-r--r-- | cppgenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp index 220971029..200615261 100644 --- a/cppgenerator.cpp +++ b/cppgenerator.cpp @@ -3116,7 +3116,7 @@ void CppGenerator::writeFlagsUnaryOperator(QTextStream& s, const AbstractMetaEnu void CppGenerator::writeClassRegister(QTextStream& s, const AbstractMetaClass* metaClass) { QString pyTypeName = cpythonTypeName(metaClass); - s << "PyAPI_FUNC(void) init_" << metaClass->qualifiedCppName().replace("::", "_") << "(PyObject* module)" << endl; + s << "void init_" << metaClass->qualifiedCppName().replace("::", "_") << "(PyObject* module)" << endl; s << '{' << endl; s << INDENT << cpythonTypeNameExt(metaClass->typeEntry()) << " = reinterpret_cast<PyTypeObject*>(&" << cpythonTypeName(metaClass->typeEntry()) << ");" << endl << endl; |