diff --git a/Lib/perl5/director.swg b/Lib/perl5/director.swg index 5acc4fd15..34514972a 100644 --- a/Lib/perl5/director.swg +++ b/Lib/perl5/director.swg @@ -33,8 +33,8 @@ namespace Swig { class Director; - SWIGINTERN std::map& get_rtdir_map() { - static std::map rtdir_map; + SWIGINTERN std::map& get_rtdir_map() { + static std::map rtdir_map; return rtdir_map; } @@ -43,15 +43,15 @@ namespace Swig { } SWIGINTERNINLINE Director *get_rtdir(void *vptr) { - std::map::const_iterator pos = get_rtdir_map().find(vptr); + std::map::const_iterator pos = get_rtdir_map().find(vptr); Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0; return rtdir; } } # endif /* SWIG_DIRECTOR_RTDIR */ -# define SWIG_DIRECTOR_CAST(ARG) Swig::get_rtdir(static_cast(ARG)) -# define SWIG_DIRECTOR_RGTR(ARG1, ARG2) Swig::set_rtdir(static_cast(ARG1), ARG2) +# define SWIG_DIRECTOR_CAST(ARG) Swig::get_rtdir(static_cast(ARG)) +# define SWIG_DIRECTOR_RGTR(ARG1, ARG2) Swig::set_rtdir(static_cast(ARG1), ARG2) #else @@ -293,16 +293,16 @@ namespace Swig { } /* methods to implement pseudo protected director members */ - virtual bool swig_get_inner(const char* /* swig_protected_method_name */) const { + virtual bool swig_get_inner(const char * /* swig_protected_method_name */) const { return true; } - virtual void swig_set_inner(const char* /* swig_protected_method_name */, bool /* swig_val */) const { + virtual void swig_set_inner(const char * /* swig_protected_method_name */, bool /* swig_val */) const { } /* ownership management */ private: - typedef std::map swig_ownership_map; + typedef std::map swig_ownership_map; mutable swig_ownership_map swig_owner; public: diff --git a/Lib/python/director.swg b/Lib/python/director.swg index 97edc7ef0..d6bfe51f0 100644 --- a/Lib/python/director.swg +++ b/Lib/python/director.swg @@ -68,8 +68,8 @@ namespace Swig { class Director; - SWIGINTERN std::map& get_rtdir_map() { - static std::map rtdir_map; + SWIGINTERN std::map& get_rtdir_map() { + static std::map rtdir_map; return rtdir_map; } @@ -78,15 +78,15 @@ namespace Swig { } SWIGINTERNINLINE Director *get_rtdir(void *vptr) { - std::map::const_iterator pos = get_rtdir_map().find(vptr); + std::map::const_iterator pos = get_rtdir_map().find(vptr); Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0; return rtdir; } } # endif /* SWIG_DIRECTOR_RTDIR */ -# define SWIG_DIRECTOR_CAST(ARG) Swig::get_rtdir(static_cast(ARG)) -# define SWIG_DIRECTOR_RGTR(ARG1, ARG2) Swig::set_rtdir(static_cast(ARG1), ARG2) +# define SWIG_DIRECTOR_CAST(ARG) Swig::get_rtdir(static_cast(ARG)) +# define SWIG_DIRECTOR_RGTR(ARG1, ARG2) Swig::set_rtdir(static_cast(ARG1), ARG2) #else @@ -196,7 +196,7 @@ namespace Swig { protected: std::string swig_msg; public: - DirectorException(PyObject *error, const char* hdr ="", const char* msg ="") + DirectorException(PyObject *error, const char *hdr ="", const char *msg ="") : swig_msg(hdr) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; @@ -272,12 +272,12 @@ namespace Swig { /* type mismatch in the return value from a python method call */ class DirectorTypeMismatchException : public Swig::DirectorException { public: - DirectorTypeMismatchException(PyObject *error, const char* msg="") + DirectorTypeMismatchException(PyObject *error, const char *msg="") : Swig::DirectorException(error, "SWIG director type mismatch", msg) { } - DirectorTypeMismatchException(const char* msg="") + DirectorTypeMismatchException(const char *msg="") : Swig::DirectorException(PyExc_TypeError, "SWIG director type mismatch", msg) { } @@ -296,7 +296,7 @@ namespace Swig { /* any python exception that occurs during a director method call */ class DirectorMethodException : public Swig::DirectorException { public: - DirectorMethodException(const char* msg = "") + DirectorMethodException(const char *msg = "") : DirectorException(PyExc_RuntimeError, "SWIG director method error.", msg) { } @@ -311,7 +311,7 @@ namespace Swig { class DirectorPureVirtualException : public Swig::DirectorException { public: - DirectorPureVirtualException(const char* msg = "") + DirectorPureVirtualException(const char *msg = "") : DirectorException(PyExc_RuntimeError, "SWIG director pure virtual method called", msg) { } @@ -356,7 +356,7 @@ namespace Swig { class Director { private: /* pointer to the wrapped python object */ - PyObject* swig_self; + PyObject *swig_self; /* flag indicating whether the object is owned by python or c++ */ mutable bool swig_disown_flag; @@ -371,7 +371,7 @@ namespace Swig { public: /* wrap a python object, optionally taking ownership */ - Director(PyObject* self) : swig_self(self), swig_disown_flag(false) { + Director(PyObject *self) : swig_self(self), swig_disown_flag(false) { swig_incref(); } @@ -404,16 +404,16 @@ namespace Swig { } /* methods to implement pseudo protected director members */ - virtual bool swig_get_inner(const char* /* swig_protected_method_name */) const { + virtual bool swig_get_inner(const char * /* swig_protected_method_name */) const { return true; } - virtual void swig_set_inner(const char* /* swig_protected_method_name */, bool /* swig_val */) const { + virtual void swig_set_inner(const char * /* swig_protected_method_name */, bool /* swig_val */) const { } /* ownership management */ private: - typedef std::map swig_ownership_map; + typedef std::map swig_ownership_map; mutable swig_ownership_map swig_owner; #ifdef __THREAD__ static PyThread_type_lock swig_mutex_own; @@ -461,7 +461,7 @@ namespace Swig { } template - static PyObject* swig_pyobj_disown(PyObject *pyobj, PyObject *SWIGUNUSEDPARM(args)) + static PyObject *swig_pyobj_disown(PyObject *pyobj, PyObject *SWIGUNUSEDPARM(args)) { SwigPyObject *sobj = (SwigPyObject *)pyobj; sobj->own = 0; diff --git a/Source/Modules/perl5.cxx b/Source/Modules/perl5.cxx index d7a131aa2..28f4a3f3d 100644 --- a/Source/Modules/perl5.cxx +++ b/Source/Modules/perl5.cxx @@ -1988,16 +1988,17 @@ public: But for now, this seems to be the least intrusive way. */ - Printf(f_directors_h, "\n\n"); - Printf(f_directors_h, "/* Internal Director utilities */\n"); + Printf(f_directors_h, "\n"); + Printf(f_directors_h, "/* Internal director utilities */\n"); Printf(f_directors_h, "public:\n"); - Printf(f_directors_h, " bool swig_get_inner(const char* swig_protected_method_name) const {\n"); + Printf(f_directors_h, " bool swig_get_inner(const char *swig_protected_method_name) const {\n"); Printf(f_directors_h, " std::map::const_iterator iv = swig_inner.find(swig_protected_method_name);\n"); Printf(f_directors_h, " return (iv != swig_inner.end() ? iv->second : false);\n"); - Printf(f_directors_h, " }\n\n"); + Printf(f_directors_h, " }\n"); - Printf(f_directors_h, " void swig_set_inner(const char* swig_protected_method_name, bool val) const\n"); - Printf(f_directors_h, " { swig_inner[swig_protected_method_name] = val;}\n\n"); + Printf(f_directors_h, " void swig_set_inner(const char *swig_protected_method_name, bool val) const {\n"); + Printf(f_directors_h, " swig_inner[swig_protected_method_name] = val;\n"); + Printf(f_directors_h, " }\n"); Printf(f_directors_h, "private:\n"); Printf(f_directors_h, " mutable std::map swig_inner;\n"); } diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index 1022f9fa0..e281bbbec 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -3074,22 +3074,23 @@ public: But for now, this seems to be the least intrusive way. */ - Printf(f_directors_h, "\n\n"); - Printf(f_directors_h, "/* Internal Director utilities */\n"); + Printf(f_directors_h, "\n"); + Printf(f_directors_h, "/* Internal director utilities */\n"); Printf(f_directors_h, "public:\n"); - Printf(f_directors_h, " bool swig_get_inner(const char* swig_protected_method_name) const {\n"); + Printf(f_directors_h, " bool swig_get_inner(const char *swig_protected_method_name) const {\n"); Printf(f_directors_h, " std::map::const_iterator iv = swig_inner.find(swig_protected_method_name);\n"); Printf(f_directors_h, " return (iv != swig_inner.end() ? iv->second : false);\n"); - Printf(f_directors_h, " }\n\n"); + Printf(f_directors_h, " }\n"); - Printf(f_directors_h, " void swig_set_inner(const char* swig_protected_method_name, bool val) const\n"); - Printf(f_directors_h, " { swig_inner[swig_protected_method_name] = val;}\n\n"); + Printf(f_directors_h, " void swig_set_inner(const char *swig_protected_method_name, bool val) const {\n"); + Printf(f_directors_h, " swig_inner[swig_protected_method_name] = val;\n"); + Printf(f_directors_h, " }\n"); Printf(f_directors_h, "private:\n"); Printf(f_directors_h, " mutable std::map swig_inner;\n"); } if (director_method_index) { - Printf(f_directors_h, "\n\n"); + Printf(f_directors_h, "\n"); Printf(f_directors_h, "#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)\n"); Printf(f_directors_h, "/* VTable implementation */\n"); Printf(f_directors_h, " PyObject *swig_get_method(size_t method_index, const char *method_name) const {\n");