1 // SWIG typemaps for otk::ustring
11 /* Overloading check */
13 %typemap(typecheck) ustring = char *;
14 %typemap(typecheck) const ustring & = char *;
16 %typemap(in) ustring {
17 if (PyString_Check($input))
18 $1 = otk::ustring(PyString_AsString($input));
20 SWIG_exception(SWIG_TypeError, "ustring expected");
23 %typemap(in) const ustring & (otk::ustring temp) {
24 if (PyString_Check($input)) {
25 temp = otk::ustring(PyString_AsString($input));
28 SWIG_exception(SWIG_TypeError, "ustring expected");
32 %typemap(out) ustring {
33 $result = PyString_FromString($1.c_str());
36 %typemap(out) const ustring & {
37 $result = PyString_FromString($1->c_str());