1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
3 %module otk_rendertexture
6 #include "otk/ustring.hh"
12 /* Overloading check */
14 %typemap(typecheck) ustring = char *;
15 %typemap(typecheck) const ustring & = char *;
17 %typemap(in) ustring {
18 if (PyString_Check($input))
19 $1 = otk::ustring(PyString_AsString($input));
21 SWIG_exception(SWIG_TypeError, "string expected");
24 %typemap(in) const ustring & (otk::ustring temp) {
25 if (PyString_Check($input)) {
26 temp = otk::ustring(PyString_AsString($input));
29 SWIG_exception(SWIG_TypeError, "string expected");
33 %typemap(out) ustring {
34 $result = PyString_FromString($1.c_str());
37 %typemap(out) const ustring & {
38 $result = PyString_FromString($1->c_str());