Commit ef15d7a495b5821d0fa23beddf7f2a634badc0b7
1 parent
83984a06
Add missing GEvents type conversion to CTA Python interface
Showing
1 changed file
with
16 additions
and
0 deletions
inst/cta/pyext/cta.i
| ... | ... | @@ -142,6 +142,22 @@ |
| 142 | 142 | } |
| 143 | 143 | $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), myinfo, 0 | 0); |
| 144 | 144 | } |
| 145 | +%typemap(out) GEvents* { | |
| 146 | + char classname[80]; | |
| 147 | + strcpy(classname, "_p_"); | |
| 148 | + strcat(classname, result->classname().c_str()); | |
| 149 | + swig_type_info *myinfo = SWIGTYPE_p_GEvents; | |
| 150 | + swig_cast_info *mycast = 0; | |
| 151 | + mycast = myinfo->cast; | |
| 152 | + while (mycast != 0) { | |
| 153 | + if (strcmp(classname, mycast->type->name) == 0) { | |
| 154 | + myinfo = mycast->type; | |
| 155 | + break; | |
| 156 | + } | |
| 157 | + mycast = mycast->next; | |
| 158 | + } | |
| 159 | + $result = SWIG_NewPointerObj(SWIG_as_voidptr($1), myinfo, 0 | 0); | |
| 160 | +} | |
| 145 | 161 | |
| 146 | 162 | /* __ CTA ________________________________________________________________ */ |
| 147 | 163 | %include "GCTAObservation.i" | ... | ... |