]> Dogcows Code - chaz/openbox/blob - wrap/otk_ustring.i
rm the old code including the .pys and the c++ shit
[chaz/openbox] / wrap / otk_ustring.i
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2
3 %module otk_rendertexture
4
5 %{
6 #include "otk/ustring.hh"
7 %}
8
9 namespace otk {
10 class ustring;
11
12 /* Overloading check */
13
14 %typemap(typecheck) ustring = char *;
15 %typemap(typecheck) const ustring & = char *;
16
17 %typemap(in) ustring {
18 if (PyString_Check($input))
19 $1 = otk::ustring(PyString_AsString($input));
20 else
21 SWIG_exception(SWIG_TypeError, "string expected");
22 }
23
24 %typemap(in) const ustring & (otk::ustring temp) {
25 if (PyString_Check($input)) {
26 temp = otk::ustring(PyString_AsString($input));
27 $1 = &temp;
28 } else {
29 SWIG_exception(SWIG_TypeError, "string expected");
30 }
31 }
32
33 %typemap(out) ustring {
34 $result = PyString_FromString($1.c_str());
35 }
36
37 %typemap(out) const ustring & {
38 $result = PyString_FromString($1->c_str());
39 }
40 }
This page took 0.040315 seconds and 4 git commands to generate.