Skip to content

Commit fafc6f4

Browse files
committed
Merge pull request #118 from tpaviot/review/standard-boolean-byref
Review/standard boolean byref
2 parents 61d72bb + 10e553d commit fafc6f4

File tree

452 files changed

+53756
-11602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

452 files changed

+53756
-11602
lines changed

src/SWIG_files/common/FunctionTransformers.i

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,33 @@ Standard_Integer & function transformation
7373
$1 = &temp;
7474
}
7575

76+
/*
77+
Standard_Boolean & function transformation
78+
*/
79+
%typemap(argout) Standard_Boolean &OutValue {
80+
PyObject *o, *o2, *o3;
81+
o = PyBool_FromLong(*$1);
82+
if ((!$result) || ($result == Py_None)) {
83+
$result = o;
84+
} else {
85+
if (!PyTuple_Check($result)) {
86+
PyObject *o2 = $result;
87+
$result = PyTuple_New(1);
88+
PyTuple_SetItem($result,0,o2);
89+
}
90+
o3 = PyTuple_New(1);
91+
PyTuple_SetItem(o3,0,o);
92+
o2 = $result;
93+
$result = PySequence_Concat(o2,o3);
94+
Py_DECREF(o2);
95+
Py_DECREF(o3);
96+
}
97+
}
98+
99+
%typemap(in,numinputs=0) Standard_Boolean &OutValue(Standard_Boolean temp) {
100+
$1 = &temp;
101+
}
102+
76103
/*
77104
FairCurve_Analysis & function transformation
78105
*/

src/SWIG_files/wrapper/AIS.i

Lines changed: 1448 additions & 179 deletions
Large diffs are not rendered by default.

src/SWIG_files/wrapper/AIS_headers.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2008-2014 Thomas Paviot ([email protected])
2+
Copyright 2008-2015 Thomas Paviot ([email protected])
33
44
55
This file is part of pythonOCC.

0 commit comments

Comments
 (0)