From: <sv...@ww...> - 2007-11-05 19:10:18
|
Author: nsmoooose Date: 2007-11-05 11:10:10 -0800 (Mon, 05 Nov 2007) New Revision: 2193 Modified: branches/layout_tool_improvements/csp/tools/layout/cLayout.i Log: Fixed swig warnings caused by using deprecated %typemap syntax Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2193 Modified: branches/layout_tool_improvements/csp/tools/layout/cLayout.i =================================================================== --- branches/layout_tool_improvements/csp/tools/layout/cLayout.i 2007-11-05 06:55:42 UTC (rev 2192) +++ branches/layout_tool_improvements/csp/tools/layout/cLayout.i 2007-11-05 19:10:10 UTC (rev 2193) @@ -34,7 +34,8 @@ %feature("director") GraphCallback; %feature("director") LayoutNodeVisitor; -%typemap(python, in) (int argc, char **argv) +#if defined(SWIGPYTHON) +%typemap(in) (int argc, char **argv) { /* Check if is a list */ if (PyList_Check($input)) @@ -64,8 +65,10 @@ return NULL; } } +#endif -%typemap(python, out) (osg::Vec3) +#if defined(SWIGPYTHON) +%typemap(out) (osg::Vec3) { PyObject* target = PyTuple_New(3); PyTuple_SetItem(target, 0, PyFloat_FromDouble($1.x())); @@ -73,6 +76,7 @@ PyTuple_SetItem(target, 2, PyFloat_FromDouble($1.z())); $result = target; } +#endif namespace osg { class Referenced { |