File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 2727 $result = list;
2828}
2929
30+ %typemap(out) odb::Point3D, Point3D {
31+ PyObject *list = PyList_New (3 );
32+ PyObject *x = PyInt_FromLong ($1 .x ());
33+ PyObject *y = PyInt_FromLong ($1 .y ());
34+ PyObject *z = PyInt_FromLong ($1 .z ());
35+ PyList_SetItem (list, 0 , x);
36+ PyList_SetItem (list, 1 , y);
37+ PyList_SetItem (list, 2 , z);
38+ $result = list;
39+ }
40+
3041// Wrapper for dbSet, dbVector...etc
3142%define WRAP_DB_CONTAINER (T)
3243%typemap(out) dbSet< T >, dbVector< T > {
Original file line number Diff line number Diff line change 2424 Tcl_SetObjResult (interp, list);
2525}
2626
27+ %typemap(out) odb::Point3D, Point3D {
28+ Tcl_Obj *list = Tcl_NewListObj (0 , nullptr );
29+ Tcl_Obj *x = Tcl_NewIntObj ($1 .x ());
30+ Tcl_Obj *y = Tcl_NewIntObj ($1 .y ());
31+ Tcl_Obj *z = Tcl_NewIntObj ($1 .z ());
32+ Tcl_ListObjAppendElement (interp, list, x);
33+ Tcl_ListObjAppendElement (interp, list, y);
34+ Tcl_ListObjAppendElement (interp, list, z);
35+ Tcl_SetObjResult (interp, list);
36+ }
37+
2738%typemap(out) std::optional<uint8_t > {
2839 if ($1 .has_value ()) {
2940 Tcl_SetIntObj ($result, (int ) $1 .value ());
You can’t perform that action at this time.
0 commit comments