Skip to content

Commit 5ba09ec

Browse files
committed
interrogate: fix compile error when building with LINK_ALL_STATIC
Fixes panda3d#442
1 parent 6c5da23 commit 5ba09ec

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dtool/src/interrogate/interfaceMakerPythonNative.cxx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,11 +1495,15 @@ write_module_support(ostream &out, ostream *out_h, InterrogateModuleDef *def) {
14951495

14961496
out << " {nullptr, nullptr, 0, nullptr}\n" << "};\n\n";
14971497

1498-
out << "extern const struct LibraryDef " << def->library_name << "_moddef = {python_simple_funcs, exports, ";
14991498
if (_external_imports.empty()) {
1500-
out << "nullptr};\n";
1499+
out << "extern const struct LibraryDef " << def->library_name << "_moddef = {python_simple_funcs, exports, nullptr};\n";
15011500
} else {
1502-
out << "imports};\n";
1501+
out <<
1502+
"#ifdef LINK_ALL_STATIC\n"
1503+
"extern const struct LibraryDef " << def->library_name << "_moddef = {python_simple_funcs, exports, nullptr};\n"
1504+
"#else\n"
1505+
"extern const struct LibraryDef " << def->library_name << "_moddef = {python_simple_funcs, exports, imports};\n"
1506+
"#endif\n";
15031507
}
15041508
if (out_h != nullptr) {
15051509
*out_h << "extern const struct LibraryDef " << def->library_name << "_moddef;\n";

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy