source: swig/python/language.i @ 06e2fc5

abac0-leakabac0-meicompt_changesgec13mei-idmei-rt0-nmei_rt0mei_rt2mei_rt2_fix_1meiyap-rt1meiyap1rt2tvf-new-xml
Last change on this file since 06e2fc5 was 06e2fc5, checked in by Mike Ryan <mikeryan@…>, 14 years ago

add swig

  • Property mode set to 100644
File size: 538 bytes
Line 
1%typemap(argout) bool &success {
2    PyObject *o, *o2, *o3;
3    o = PyBool_FromLong(*$1);
4    if ((!$result) || ($result == Py_None)) {
5        $result = o;
6    } else {
7        if (!PyTuple_Check($result)) {
8            PyObject *o2 = $result;
9            $result = PyTuple_New(1);
10            PyTuple_SetItem($result,0,o2);
11        }
12        o3 = PyTuple_New(2);
13        PyTuple_SetItem(o3,0,o);
14        PyTuple_SetItem(o3,1,$result);
15        $result = o3;
16    }
17}
18
19%typemap(in,numinputs=0) bool &success(bool temp) {
20    $1 = &temp;
21}
Note: See TracBrowser for help on using the repository browser.