3 %apply int *INPUT {int *bar};
5 %typemap(out, fragment=SWIG_From_frag(int)) int *foo {
7 $result = SWIG_From(int)(*$1);
9 $result = SWIG_Py_Void();
16 int *foo(int *bar = 0) {
20 return (bar) ? bar : 0;
26 %apply std::string *INPUT {std::string *bar};
28 %typemap(out, fragment=SWIG_From_frag(std::string)) std::string *sfoo {
30 $result = SWIG_From(std::string)(*$1);
32 $result = SWIG_Py_Void();
37 std::string *sfoo(std::string *bar = 0) {
38 if (bar) *bar += " world";
39 return (bar) ? bar : 0;