From f1fefaf0f2998d13d39c2a09f644d7c0d06548da Mon Sep 17 00:00:00 2001 From: Amorilia <amorilia@users.sourceforge.net> Date: Fri, 21 Oct 2005 20:05:01 +0000 Subject: [PATCH] fixed broken SWIG wrapper; still needs some more fixing... --- NIF_IO.h | 4 +++- nif_math.h | 2 +- pyniflib.i | 14 +++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/NIF_IO.h b/NIF_IO.h index 90827d87..906319d7 100644 --- a/NIF_IO.h +++ b/NIF_IO.h @@ -89,7 +89,9 @@ typedef uint writeResult; //typedef uint nifIndex; typedef ushort nifFlags; +#ifndef NULL #define NULL 0 +#endif /* Valid values for some texturingproperty attributes. */ typedef enum { @@ -276,4 +278,4 @@ private: -#endif // TAH_NIF_LIB_NIF_IO_H \ No newline at end of file +#endif // TAH_NIF_LIB_NIF_IO_H diff --git a/nif_math.h b/nif_math.h index 77fc3afe..67d53ef6 100644 --- a/nif_math.h +++ b/nif_math.h @@ -58,4 +58,4 @@ void SetIdentity44( Matrix44 & m ); void PrintMatrix33( Matrix33 & m, ostream & out ); Quaternion MatrixToQuat( Matrix33 & m ); -#endif \ No newline at end of file +#endif diff --git a/pyniflib.i b/pyniflib.i index c6106b52..12bad330 100644 --- a/pyniflib.i +++ b/pyniflib.i @@ -43,14 +43,14 @@ POSSIBILITY OF SUCH DAMAGE. */ try { $action } - SWIG_CATCH_STDEXCEPT // catch std::exception + //SWIG_CATCH_STDEXCEPT // catch std::exception catch (...) { - SWIG_exception(SWIG_UnknownError, "Unknown exception"); + SWIG_exception(SWIG_UnknownError, "Unknown exception"); } } %{ - #include "NIFlib/niflib.h" +#include "niflib.h" %} template <class T> @@ -62,7 +62,7 @@ struct Key { %template(vector_float) std::vector<float>; %template(vector_blk_ref) std::vector<blk_ref>; -%template(vector_Vector3D) std::vector<Vector3D>; +%template(vector_Vector3) std::vector<Vector3>; %template(vector_Color) std::vector<Color>; %template(vector_UVCoord) std::vector<UVCoord>; %template(vector_Triangle) std::vector<Triangle>; @@ -71,13 +71,13 @@ struct Key { %template(map_int_float) std::map<int, float>; %template(Key_Quaternion) Key<Quaternion>; %template(vector_Key_Quaternion) std::vector< Key<Quaternion> >; -%template(Key_Vector3D) Key<Vector3D>; -%template(vector_Key_Vector3D) std::vector< Key<Vector3D> >; +%template(Key_Vector3) Key<Vector3>; +%template(vector_Key_Vector3) std::vector< Key<Vector3> >; %template(Key_float) Key<float>; %template(vector_Key_float) std::vector< Key<float> >; %template(Key_string) Key<std::string>; %template(vector_Key_string) std::vector< Key<std::string> >; -%include "../NIFlib/niflib.h" +%include "niflib.h" -- GitLab