From d8775fa01e2702400b12f1cf4e7aa364db9ac180 Mon Sep 17 00:00:00 2001 From: Maxwell Dreytser Date: Sun, 28 Jan 2024 15:34:37 -0500 Subject: [PATCH] Fix unguarded python-specific headers. --- panda/src/linmath/lmatrix3_ext_src.h | 4 ++++ panda/src/linmath/lmatrix4_ext_src.h | 4 ++++ panda/src/linmath/lpoint2_ext_src.h | 4 ++++ panda/src/linmath/lpoint3_ext_src.h | 4 ++++ panda/src/linmath/lpoint4_ext_src.h | 4 ++++ panda/src/linmath/lvecBase2_ext_src.h | 4 ++++ panda/src/linmath/lvecBase3_ext_src.h | 4 ++++ panda/src/linmath/lvecBase4_ext_src.h | 4 ++++ panda/src/linmath/lvector2_ext_src.h | 4 ++++ panda/src/linmath/lvector3_ext_src.h | 4 ++++ panda/src/linmath/lvector4_ext_src.h | 4 ++++ panda/src/putil/paramPyObject.cxx | 4 ++++ 12 files changed, 48 insertions(+) diff --git a/panda/src/linmath/lmatrix3_ext_src.h b/panda/src/linmath/lmatrix3_ext_src.h index fa979338ff..1cc4404e85 100644 --- a/panda/src/linmath/lmatrix3_ext_src.h +++ b/panda/src/linmath/lmatrix3_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-12 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LMatrix3, which are called * instead of any C++ methods with the same prototype. @@ -26,3 +28,5 @@ public: }; #include "lmatrix3_ext_src.I" + +#endif diff --git a/panda/src/linmath/lmatrix4_ext_src.h b/panda/src/linmath/lmatrix4_ext_src.h index da7a430175..48b178bea4 100644 --- a/panda/src/linmath/lmatrix4_ext_src.h +++ b/panda/src/linmath/lmatrix4_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-12 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LMatrix4, which are called * instead of any C++ methods with the same prototype. @@ -26,3 +28,5 @@ public: }; #include "lmatrix4_ext_src.I" + +#endif diff --git a/panda/src/linmath/lpoint2_ext_src.h b/panda/src/linmath/lpoint2_ext_src.h index 496e7ec1a8..bfe4bbb16f 100644 --- a/panda/src/linmath/lpoint2_ext_src.h +++ b/panda/src/linmath/lpoint2_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-13 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LPoint2, which are called * instead of any C++ methods with the same prototype. @@ -27,3 +29,5 @@ public: }; #include "lpoint2_ext_src.I" + +#endif diff --git a/panda/src/linmath/lpoint3_ext_src.h b/panda/src/linmath/lpoint3_ext_src.h index 6789810ff5..6da9001739 100644 --- a/panda/src/linmath/lpoint3_ext_src.h +++ b/panda/src/linmath/lpoint3_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-13 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LPoint3, which are called * instead of any C++ methods with the same prototype. @@ -27,3 +29,5 @@ public: }; #include "lpoint3_ext_src.I" + +#endif diff --git a/panda/src/linmath/lpoint4_ext_src.h b/panda/src/linmath/lpoint4_ext_src.h index 2cb8eb6b9f..565eb461a0 100644 --- a/panda/src/linmath/lpoint4_ext_src.h +++ b/panda/src/linmath/lpoint4_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-13 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LPoint4, which are called * instead of any C++ methods with the same prototype. @@ -27,3 +29,5 @@ public: }; #include "lpoint4_ext_src.I" + +#endif diff --git a/panda/src/linmath/lvecBase2_ext_src.h b/panda/src/linmath/lvecBase2_ext_src.h index 372c805517..83928d72d1 100644 --- a/panda/src/linmath/lvecBase2_ext_src.h +++ b/panda/src/linmath/lvecBase2_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-13 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LVecBase2, which are called * instead of any C++ methods with the same prototype. @@ -39,3 +41,5 @@ public: }; #include "lvecBase2_ext_src.I" + +#endif diff --git a/panda/src/linmath/lvecBase3_ext_src.h b/panda/src/linmath/lvecBase3_ext_src.h index e5e509147e..19e31a526f 100644 --- a/panda/src/linmath/lvecBase3_ext_src.h +++ b/panda/src/linmath/lvecBase3_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-13 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LVecBase3, which are called * instead of any C++ methods with the same prototype. @@ -39,3 +41,5 @@ public: }; #include "lvecBase3_ext_src.I" + +#endif diff --git a/panda/src/linmath/lvecBase4_ext_src.h b/panda/src/linmath/lvecBase4_ext_src.h index b21e1b7ab7..8466b7e64b 100644 --- a/panda/src/linmath/lvecBase4_ext_src.h +++ b/panda/src/linmath/lvecBase4_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-13 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LVecBase4, which are called * instead of any C++ methods with the same prototype. @@ -39,3 +41,5 @@ public: }; #include "lvecBase4_ext_src.I" + +#endif diff --git a/panda/src/linmath/lvector2_ext_src.h b/panda/src/linmath/lvector2_ext_src.h index 6518c6ebd4..c98f104c05 100644 --- a/panda/src/linmath/lvector2_ext_src.h +++ b/panda/src/linmath/lvector2_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-13 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LVector2, which are called * instead of any C++ methods with the same prototype. @@ -27,3 +29,5 @@ public: }; #include "lvector2_ext_src.I" + +#endif diff --git a/panda/src/linmath/lvector3_ext_src.h b/panda/src/linmath/lvector3_ext_src.h index b6b94c9c74..c88dfcadc6 100644 --- a/panda/src/linmath/lvector3_ext_src.h +++ b/panda/src/linmath/lvector3_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-13 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LVector3, which are called * instead of any C++ methods with the same prototype. @@ -27,3 +29,5 @@ public: }; #include "lvector3_ext_src.I" + +#endif diff --git a/panda/src/linmath/lvector4_ext_src.h b/panda/src/linmath/lvector4_ext_src.h index e398875517..41864edcaf 100644 --- a/panda/src/linmath/lvector4_ext_src.h +++ b/panda/src/linmath/lvector4_ext_src.h @@ -11,6 +11,8 @@ * @date 2013-09-13 */ +#ifdef HAVE_PYTHON + /** * This class defines the extension methods for LVector4, which are called * instead of any C++ methods with the same prototype. @@ -27,3 +29,5 @@ public: }; #include "lvector4_ext_src.I" + +#endif diff --git a/panda/src/putil/paramPyObject.cxx b/panda/src/putil/paramPyObject.cxx index ac2e54aff9..59124bc055 100644 --- a/panda/src/putil/paramPyObject.cxx +++ b/panda/src/putil/paramPyObject.cxx @@ -13,6 +13,8 @@ #include "paramPyObject.h" +#ifdef HAVE_PYTHON + TypeHandle ParamPyObject::_type_handle; /** @@ -40,3 +42,5 @@ output(std::ostream &out) const { out << "<" << Py_TYPE(_value)->tp_name << " object at " << (void *)_value << ">"; } + +#endif