From 423367e8cda46f9d0f69932f617054cc15702aeb Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 5 Feb 2003 10:39:14 +0000 Subject: move the otk wrapper stuff into its own dir --- otk/ustring.i | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 otk/ustring.i (limited to 'otk/ustring.i') diff --git a/otk/ustring.i b/otk/ustring.i deleted file mode 100644 index d693e7dc..00000000 --- a/otk/ustring.i +++ /dev/null @@ -1,40 +0,0 @@ -// SWIG typemaps for otk::ustring - -%{ -#include "otk/ustring.hh" -%} - -namespace otk { - - class ustring; - - /* Overloading check */ - - %typemap(typecheck) ustring = char *; - %typemap(typecheck) const ustring & = char *; - - %typemap(in) ustring { - if (PyString_Check($input)) - $1 = otk::ustring(PyString_AsString($input)); - else - SWIG_exception(SWIG_TypeError, "ustring expected"); - } - - %typemap(in) const ustring & (otk::ustring temp) { - if (PyString_Check($input)) { - temp = otk::ustring(PyString_AsString($input)); - $1 = &temp; - } else { - SWIG_exception(SWIG_TypeError, "ustring expected"); - } - } - - %typemap(out) ustring { - $result = PyString_FromString($1.c_str()); - } - - %typemap(out) const ustring & { - $result = PyString_FromString($1->c_str()); - } - -} -- cgit v1.2.3