From 64120cd7d835893d0e770d235e0d633a859e3b2a Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sat, 28 Mar 2015 11:16:40 -0700 Subject: [PATCH 1/5] general: Add missing includes and forward-declarations. --- dtool/src/cppparser/cppTypedefType.h | 1 + dtool/src/interrogate/functionRemap.cxx | 1 + dtool/src/interrogate/interfaceMakerPythonNative.cxx | 7 +++++++ panda/src/egg2pg/eggSaver.h | 1 + panda/src/pgraph/shaderAttrib.cxx | 1 + 5 files changed, 11 insertions(+) diff --git a/dtool/src/cppparser/cppTypedefType.h b/dtool/src/cppparser/cppTypedefType.h index eb6ab016cf..ad6c33ffa2 100644 --- a/dtool/src/cppparser/cppTypedefType.h +++ b/dtool/src/cppparser/cppTypedefType.h @@ -19,6 +19,7 @@ #include "cppType.h" class CPPIdentifier; +class CPPInstanceIdentifier; /////////////////////////////////////////////////////////////////// // Class : CPPTypedefType diff --git a/dtool/src/interrogate/functionRemap.cxx b/dtool/src/interrogate/functionRemap.cxx index e1abae2c06..a1636b592e 100644 --- a/dtool/src/interrogate/functionRemap.cxx +++ b/dtool/src/interrogate/functionRemap.cxx @@ -23,6 +23,7 @@ #include "interrogateDatabase.h" #include "cppInstance.h" +#include "cppConstType.h" #include "cppFunctionType.h" #include "cppParameterList.h" #include "cppReferenceType.h" diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 7770cd748a..b3776e6f12 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -21,10 +21,17 @@ #include "interrogateDatabase.h" #include "interrogateType.h" #include "interrogateFunction.h" +#include "cppArrayType.h" +#include "cppConstType.h" +#include "cppEnumType.h" #include "cppFunctionType.h" +#include "cppFunctionGroup.h" #include "cppPointerType.h" #include "cppTypeDeclaration.h" +#include "cppTypedefType.h" +#include "cppSimpleType.h" #include "cppStructType.h" +#include "cppExpression.h" #include "vector" #include "cppParameterList.h" #include "algorithm" diff --git a/panda/src/egg2pg/eggSaver.h b/panda/src/egg2pg/eggSaver.h index 0dfbdc8838..7cb52908cd 100755 --- a/panda/src/egg2pg/eggSaver.h +++ b/panda/src/egg2pg/eggSaver.h @@ -40,6 +40,7 @@ class GeomVertexData; class GeomPrimitive; class PandaNode; class RenderState; +class Material; class Texture; class CharacterJoint; class EggVertex; diff --git a/panda/src/pgraph/shaderAttrib.cxx b/panda/src/pgraph/shaderAttrib.cxx index f0a3631af4..ad9b1a6eef 100755 --- a/panda/src/pgraph/shaderAttrib.cxx +++ b/panda/src/pgraph/shaderAttrib.cxx @@ -23,6 +23,7 @@ #include "bamWriter.h" #include "datagram.h" #include "datagramIterator.h" +#include "nodePath.h" TypeHandle ShaderAttrib::_type_handle; int ShaderAttrib::_attrib_slot; From 53d10aa3a321e641401ae672afbcbb05d7a0a75a Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 28 Mar 2015 20:51:08 +0100 Subject: [PATCH 2/5] Fix sticky exception when passing over overloads with single string arg. --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index b3776e6f12..0242377280 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -4659,6 +4659,8 @@ write_function_instance(ostream &out, FunctionRemap *remap, } expected_params += "str"; } + // Remember to clear the TypeError that any of the above methods raise. + clear_error = true; only_pyobjects = false; } else if (TypeManager::is_bool(type)) { From eaedfa68dc5fe5b32c55694065875162995ef29b Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 28 Mar 2015 20:51:45 +0100 Subject: [PATCH 3/5] Fix regression: methods returning const char pointer were ignored. --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 0242377280..4b2148a74a 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -6415,8 +6415,9 @@ is_remap_legal(FunctionRemap *remap) { } // We don't currently support returning pointers, but we accept - // them as function parameters. - if (TypeManager::is_pointer_to_simple(remap->_return_type->get_orig_type())) { + // them as function parameters. But const char * is an exception. + if (!remap->_return_type->new_type_is_atomic_string() && + TypeManager::is_pointer_to_simple(remap->_return_type->get_orig_type())) { return false; } From ff58db25ac0dd03914fbb9275a2ba68cc833d3db Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 28 Mar 2015 21:55:55 +0100 Subject: [PATCH 4/5] Fix inheritance of hash functions, restore compare_to(), slot get_hash/get_key --- dtool/src/interrogate/functionRemap.cxx | 22 +-- dtool/src/interrogate/functionRemap.h | 9 +- .../interfaceMakerPythonNative.cxx | 135 +++++++----------- .../interrogate/interfaceMakerPythonNative.h | 3 +- dtool/src/interrogatedb/dtool_super_base.cxx | 12 +- dtool/src/interrogatedb/py_panda.cxx | 39 +---- dtool/src/interrogatedb/py_panda.h | 36 +---- 7 files changed, 72 insertions(+), 184 deletions(-) diff --git a/dtool/src/interrogate/functionRemap.cxx b/dtool/src/interrogate/functionRemap.cxx index a1636b592e..b2f703c926 100644 --- a/dtool/src/interrogate/functionRemap.cxx +++ b/dtool/src/interrogate/functionRemap.cxx @@ -796,22 +796,6 @@ setup_properties(const InterrogateFunction &ifunc, InterfaceMaker *interface_mak _flags |= F_iter; } - } else if (fname == "__getbuffer__") { - if (_has_this && _parameters.size() == 3 && - TypeManager::is_integer(_return_type->get_new_type()) && - TypeManager::is_pointer_to_Py_buffer(_parameters[1]._remap->get_orig_type()) && - TypeManager::is_integer(_parameters[2]._remap->get_orig_type())) { - - _flags |= F_getbuffer; - } - - } else if (fname == "__releasebuffer__") { - if (_has_this && _parameters.size() == 2 && - TypeManager::is_pointer_to_Py_buffer(_parameters[1]._remap->get_orig_type())) { - - _flags |= F_releasebuffer; - } - } else if (fname == "compare_to") { if (_has_this && _parameters.size() == 2 && TypeManager::is_integer(_return_type->get_new_type())) { @@ -833,6 +817,12 @@ setup_properties(const InterrogateFunction &ifunc, InterfaceMaker *interface_mak _flags |= F_divide_float; } + } else if (fname == "get_key" || fname == "get_hash") { + if (_has_this && _parameters.size() == 1 && + TypeManager::is_integer(_return_type->get_new_type())) { + _flags |= F_hash; + } + } else if (fname == "operator ()" || fname == "__call__") { // Call operators always take keyword arguments. _args_type = InterfaceMaker::AT_keyword_args; diff --git a/dtool/src/interrogate/functionRemap.h b/dtool/src/interrogate/functionRemap.h index 7d2f88fd6b..969aa3b969 100644 --- a/dtool/src/interrogate/functionRemap.h +++ b/dtool/src/interrogate/functionRemap.h @@ -94,11 +94,10 @@ public: F_copy_constructor = 0x0100, F_explicit_self = 0x0200, F_iter = 0x0400, - F_getbuffer = 0x0800, - F_releasebuffer = 0x1000, - F_compare_to = 0x2000, - F_coerce_constructor = 0x4000, - F_divide_float = 0x8000, + F_compare_to = 0x0800, + F_coerce_constructor = 0x1000, + F_divide_float = 0x2000, + F_hash = 0x4000, }; typedef vector Parameters; diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 4b2148a74a..0835387141 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -321,6 +321,7 @@ get_slotted_function_def(Object *obj, Function *func, FunctionRemap *remap, def._answer_location = string(); def._wrapper_type = WT_none; def._min_version = 0; + def._keep_method = false; string method_name = func->_ifunc.get_name(); bool is_unary_op = func->_ifunc.is_unary_op(); @@ -591,6 +592,14 @@ get_slotted_function_def(Object *obj, Function *func, FunctionRemap *remap, if (method_name == "__cmp__" || (remap->_flags & FunctionRemap::F_compare_to) != 0) { def._answer_location = "tp_compare"; def._wrapper_type = WT_compare; + def._keep_method = (method_name != "__cmp__"); + return true; + } + + if (method_name == "__hash__" || (remap->_flags & FunctionRemap::F_hash) != 0) { + def._answer_location = "tp_hash"; + def._wrapper_type = WT_hash; + def._keep_method = (method_name != "__hash__"); return true; } @@ -1397,7 +1406,6 @@ write_module(ostream &out, ostream *out_h, InterrogateModuleDef *def) { ///////////////////////////////////////////////////////////////////////////////////////////// void InterfaceMakerPythonNative:: write_module_class(ostream &out, Object *obj) { - bool has_local_hash = false; bool has_local_repr = false; bool has_local_str = false; bool has_local_richcompare = false; @@ -1496,6 +1504,9 @@ write_module_class(ostream &out, Object *obj) { slots[key] = slotted_def; slots[key]._remaps.insert(remap); } + if (slotted_def._keep_method) { + has_nonslotted = true; + } // Python 3 doesn't support nb_divide. It has nb_true_divide and also // nb_floor_divide, but they have different semantics than in C++. Ugh. @@ -2272,6 +2283,26 @@ write_module_class(ostream &out, Object *obj) { } break; + case WT_hash: + // Py_hash_t func(PyObject *self) + { + out << "//////////////////\n"; + out << "// A wrapper function to satisfy Python's internal calling conventions.\n"; + out << "// " << ClassName << " slot " << rfi->second._answer_location << " -> " << fname << "\n"; + out << "//////////////////\n"; + out << "static Py_hash_t " << def._wrapper_name << "(PyObject *self) {\n"; + out << " " << cClassName << " *local_this = NULL;\n"; + out << " if (!Dtool_Call_ExtractThisPointer(self, Dtool_" << ClassName << ", (void **)&local_this)) {\n"; + out << " return -1;\n"; + out << " }\n\n"; + + FunctionRemap *remap = *def._remaps.begin(); + vector_string params; + out << " return (Py_hash_t) " << remap->call_function(out, 4, false, "local_this", params) << ";\n"; + out << "}\n\n"; + } + break; + case WT_none: // Nothing special about the wrapper function: just write it normally. string fname = "static PyObject *" + def._wrapper_name + "(PyObject *self, PyObject *args, PyObject *kwds)\n"; @@ -2288,37 +2319,6 @@ write_module_class(ostream &out, Object *obj) { } } - string get_key = HasAGetKeyFunction(obj->_itype); - if (!get_key.empty()) { - out << "//////////////////\n"; - out << "// A LocalHash(getKey) Function for this type\n"; - out << "// " << ClassName << "\n"; - out << "//////////////////\n"; - out << "static Py_hash_t Dtool_HashKey_" << ClassName << "(PyObject *self) {\n"; - out << " " << cClassName << " *local_this = NULL;\n"; - out << " if (!Dtool_Call_ExtractThisPointer(self, Dtool_" << ClassName << ", (void **)&local_this)) {\n"; - out << " return -1;\n"; - out << " }\n\n"; - out << " return local_this->" << get_key << "();\n"; - out << "}\n\n"; - has_local_hash = true; - } else { - if (bases.size() == 0) { - out << "//////////////////\n"; - out << "// A LocalHash(This Pointer) Function for this type\n"; - out << "// " << ClassName << "\n"; - out << "//////////////////\n"; - out << "static Py_hash_t Dtool_HashKey_" << ClassName << "(PyObject *self) {\n"; - out << " " << cClassName << " *local_this = NULL;\n"; - out << " if (!Dtool_Call_ExtractThisPointer(self, Dtool_" << ClassName << ", (void **)&local_this)) {\n"; - out << " return -1;\n"; - out << " }\n\n"; - out << " return (Py_hash_t) local_this;\n"; - out << "}\n\n"; - has_local_hash = true; - } - } - int need_repr = 0; if (slots.count("tp_repr") == 0) { need_repr = NeedsAReprFunction(obj->_itype); @@ -2532,6 +2532,12 @@ write_module_class(ostream &out, Object *obj) { out << "};\n\n"; } + // These fields are inherited together. We should either write all of them + // or none of them so that they are inherited from DTOOL_SUPER_BASE. + bool has_hash_compare = (slots.count("tp_hash") != 0 || + slots.count("tp_compare") != 0 || + has_local_richcompare); + bool has_parent_class = (obj->_itype.number_of_derivations() != 0); // Output the type slot tables. @@ -2661,12 +2667,11 @@ write_module_class(ostream &out, Object *obj) { out << "#if PY_MAJOR_VERSION >= 3\n"; out << " 0, // tp_reserved\n"; out << "#else\n"; - if (slots.count("tp_compare") != 0) { - write_function_slot(out, 4, slots, "tp_compare"); + if (has_hash_compare) { + write_function_slot(out, 4, slots, "tp_compare", + "&DTOOL_PyObject_ComparePointers"); } else { - // We can/should still define a comparison in Python 2 that is more - // meaningful that comparing id(x) with id(y). - out << " &DTOOL_PyObject_ComparePointers,\n"; + out << " 0, // tp_compare\n"; } out << "#endif\n"; @@ -2693,10 +2698,10 @@ write_module_class(ostream &out, Object *obj) { } // hashfunc tp_hash; - if (has_local_hash) { - out << " &Dtool_HashKey_" << ClassName << ",\n"; + if (has_hash_compare) { + write_function_slot(out, 4, slots, "tp_hash", "&DTOOL_PyObject_HashPointer"); } else { - write_function_slot(out, 4, slots, "tp_hash"); + out << " 0, // tp_hash\n"; } // ternaryfunc tp_call; @@ -2762,14 +2767,15 @@ write_module_class(ostream &out, Object *obj) { // richcmpfunc tp_richcompare; if (has_local_richcompare) { out << " &Dtool_RichCompare_" << ClassName << ",\n"; - } else if (has_local_hash) { + } else if (has_hash_compare) { + // All hashable types need to be comparable. out << "#if PY_MAJOR_VERSION >= 3\n"; out << " &DTOOL_PyObject_RichCompare,\n"; out << "#else\n"; - out << " 0,\n"; + out << " 0, // tp_richcompare\n"; out << "#endif\n"; } else { - write_function_slot(out, 4, slots, "tp_richcompare"); + out << " 0, // tp_richcompare\n"; } // Py_ssize_t tp_weaklistoffset; @@ -3114,7 +3120,7 @@ write_function_for_top(ostream &out, InterfaceMaker::Object *obj, InterfaceMaker } SlottedFunctionDef slotted_def; - if (!get_slotted_function_def(obj, func, remap, slotted_def)) { + if (!get_slotted_function_def(obj, func, remap, slotted_def) || slotted_def._keep_method) { // It has a non-slotted remap, so we should write it. has_remaps = true; break; @@ -6614,47 +6620,6 @@ DoesInheritFromIsClass(const CPPStructType *inclass, const std::string &name) { return false; } -//////////////////////////////////////////////////////////////////////////////////////////// -// Function : HasAGetKeyFunction -// -// does the class have a supportable get_key() or get_hash() to return -// a usable Python hash? Returns the name of the method, or empty -// string if there is no suitable method. -////////////////////////////////////////////////////////////////////////////////////////// -string InterfaceMakerPythonNative:: -HasAGetKeyFunction(const InterrogateType &itype_class) { - InterrogateDatabase *idb = InterrogateDatabase::get_ptr(); - - int num_methods = itype_class.number_of_methods(); - int mi; - for (mi = 0; mi < num_methods; mi++) { - FunctionIndex func_index = itype_class.get_method(mi); - const InterrogateFunction &ifunc = idb->get_function(func_index); - if (ifunc.get_name() == "get_key" || ifunc.get_name() == "get_hash") { - if (ifunc._instances != (InterrogateFunction::Instances *)NULL) { - InterrogateFunction::Instances::const_iterator ii; - for (ii = ifunc._instances->begin(); - ii != ifunc._instances->end(); - ++ii) { - CPPInstance *cppinst = (*ii).second; - CPPFunctionType *cppfunc = cppinst->_type->as_function_type(); - - if (cppfunc != NULL) { - if (cppfunc->_parameters != NULL && - cppfunc->_return_type != NULL && - TypeManager::is_integer(cppfunc->_return_type)) { - if (cppfunc->_parameters->_parameters.size() == 0) { - return ifunc.get_name(); - } - } - } - } - } - } - } - return string(); -} - //////////////////////////////////////////////////////////////////////////////////////////// // Function : HasAGetClassTypeFunction // diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.h b/dtool/src/interrogate/interfaceMakerPythonNative.h index 972a589233..aa3aa5071c 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.h +++ b/dtool/src/interrogate/interfaceMakerPythonNative.h @@ -82,6 +82,7 @@ private: WT_inplace_ternary_operator, WT_traverse, WT_compare, + WT_hash, }; // This enum is passed to the wrapper generation functions to indicate @@ -118,6 +119,7 @@ private: int _min_version; string _wrapper_name; set _remaps; + bool _keep_method; }; typedef std::map SlottedFunctions; @@ -197,7 +199,6 @@ public: bool DoesInheritFromIsClass(const CPPStructType * inclass, const std::string &name); bool IsPandaTypedObject(CPPStructType * inclass) { return DoesInheritFromIsClass(inclass,"TypedObject"); }; void write_python_instance(ostream &out, int indent_level, const std::string &return_expr, bool owns_memory, const std::string &class_name, CPPType *ctype, bool is_const); - string HasAGetKeyFunction(const InterrogateType &itype_class); bool HasAGetClassTypeFunction(const InterrogateType &itype_class); int NeedsAStrFunction(const InterrogateType &itype_class); int NeedsAReprFunction(const InterrogateType &itype_class); diff --git a/dtool/src/interrogatedb/dtool_super_base.cxx b/dtool/src/interrogatedb/dtool_super_base.cxx index 24911751a8..d695fb5ef5 100644 --- a/dtool/src/interrogatedb/dtool_super_base.cxx +++ b/dtool/src/interrogatedb/dtool_super_base.cxx @@ -30,14 +30,6 @@ PyMethodDef Dtool_Methods_DTOOL_SUPER_BASE[] = { { NULL, NULL } }; -static Py_hash_t Dtool_HashKey_DTOOL_SUPER_BASE(PyObject *self) { - void *local_this = DTOOL_Call_GetPointerThis(self); - if (local_this == NULL) { - return -1; - } - return (Py_hash_t) local_this; -}; - EXPCL_DTOOLCONFIG void Dtool_PyModuleClassInit_DTOOL_SUPER_BASE(PyObject *module) { static bool initdone = false; if (!initdone) { @@ -87,13 +79,13 @@ EXPORT_THIS Dtool_PyTypedObject Dtool_DTOOL_SUPER_BASE = { #if PY_MAJOR_VERSION >= 3 0, #else - &DTOOL_PyObject_Compare, + &DTOOL_PyObject_ComparePointers, #endif 0, 0, 0, 0, - &Dtool_HashKey_DTOOL_SUPER_BASE, + &DTOOL_PyObject_HashPointer, 0, 0, PyObject_GenericGetAttr, diff --git a/dtool/src/interrogatedb/py_panda.cxx b/dtool/src/interrogatedb/py_panda.cxx index 3edfffe89c..11af0c1ace 100644 --- a/dtool/src/interrogatedb/py_panda.cxx +++ b/dtool/src/interrogatedb/py_panda.cxx @@ -594,40 +594,13 @@ PyObject *Dtool_AddToDictionary(PyObject *self1, PyObject *args) { } /////////////////////////////////////////////////////////////////////////////////// -/* -inline long DTool_HashKey(PyObject * inst) -{ - long outcome = (long)inst; - PyObject *func = PyObject_GetAttrString(inst, "__hash__"); - if (func == NULL) - { - if (DtoolCanThisBeAPandaInstance(inst)) - if (((Dtool_PyInstDef *)inst)->_ptr_to_object != NULL) - outcome = (long)((Dtool_PyInstDef *)inst)->_ptr_to_object; - } - else - { - PyObject *res = PyEval_CallObject(func, (PyObject *)NULL); - Py_DECREF(func); - if (res == NULL) - return -1; - if (PyInt_Check(res)) - { - outcome = PyInt_AsLong(res); - if (outcome == -1) - outcome = -2; - } - else - { - PyErr_SetString(PyExc_TypeError, - "__hash__() should return an int"); - outcome = -1; - } - Py_DECREF(res); - } - return outcome; +Py_hash_t DTOOL_PyObject_HashPointer(PyObject *self) { + if (self != NULL && DtoolCanThisBeAPandaInstance(self)) { + Dtool_PyInstDef * pyself = (Dtool_PyInstDef *) self; + return (Py_hash_t) pyself->_ptr_to_object; + } + return -1; } -*/ /* Compare v to w. Return -1 if v < w or exception (PyErr_Occurred() true in latter case). diff --git a/dtool/src/interrogatedb/py_panda.h b/dtool/src/interrogatedb/py_panda.h index e05f90794e..e6847359c3 100755 --- a/dtool/src/interrogatedb/py_panda.h +++ b/dtool/src/interrogatedb/py_panda.h @@ -489,40 +489,8 @@ EXPCL_DTOOLCONFIG PyObject *Dtool_BorrowThisReference(PyObject *self, PyObject * EXPCL_DTOOLCONFIG PyObject *Dtool_AddToDictionary(PyObject *self1, PyObject *args); /////////////////////////////////////////////////////////////////////////////////// -/* -EXPCL_DTOOLCONFIG long DTool_HashKey(PyObject * inst) -{ - long outcome = (long)inst; - PyObject * func = PyObject_GetAttrString(inst, "__hash__"); - if (func == NULL) - { - if(DtoolCanThisBeAPandaInstance(inst)) - if(((Dtool_PyInstDef *)inst)->_ptr_to_object != NULL) - outcome = (long)((Dtool_PyInstDef *)inst)->_ptr_to_object; - } - else - { - PyObject *res = PyEval_CallObject(func, (PyObject *)NULL); - Py_DECREF(func); - if (res == NULL) - return -1; - if (PyInt_Check(res)) - { - outcome = PyInt_AsLong(res); - if (outcome == -1) - outcome = -2; - } - else - { - PyErr_SetString(PyExc_TypeError, - "__hash__() should return an int"); - outcome = -1; - } - Py_DECREF(res); - } - return outcome; -} -*/ + +EXPCL_DTOOLCONFIG Py_hash_t DTOOL_PyObject_HashPointer(PyObject *obj); /* Compare v to w. Return -1 if v < w or exception (PyErr_Occurred() true in latter case). From 10dd9120beb4f5d3310b2a2a9802a8e39ac8217f Mon Sep 17 00:00:00 2001 From: Ed Swartz Date: Sat, 28 Mar 2015 22:16:00 +0100 Subject: [PATCH 5/5] Patch to fix fftw compile error on Linux --- makepanda/makepanda.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 30b5b48c17..620981d136 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -714,7 +714,7 @@ if (COMPILER=="GCC"): SmartPkgEnable("FFMPEG", ffmpeg_libs, ffmpeg_libs, ffmpeg_libs) SmartPkgEnable("SWSCALE", "libswscale", "libswscale", ("libswscale", "libswscale/swscale.h"), target_pkg = "FFMPEG") SmartPkgEnable("SWRESAMPLE","libswresample", "libswresample", ("libswresample", "libswresample/swresample.h"), target_pkg = "FFMPEG") - SmartPkgEnable("FFTW", "", ("fftw", "rfftw"), ("fftw.h", "rfftw.h")) + SmartPkgEnable("FFTW", "", ("rfftw", "fftw"), ("fftw.h", "rfftw.h")) SmartPkgEnable("FMODEX", "", ("fmodex"), ("fmodex", "fmodex/fmod.h")) SmartPkgEnable("FREETYPE", "freetype2", ("freetype"), ("freetype2", "freetype2/freetype/freetype.h")) SmartPkgEnable("GL", "gl", ("GL"), ("GL/gl.h"), framework = "OpenGL")