Skip to content

Commit

Permalink
[workflows] fix build swig 4.3. Thanks' @Hains
Browse files Browse the repository at this point in the history
  • Loading branch information
fairbird committed Jan 5, 2025
1 parent 65f6cab commit b418c08
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/python/enigma_python.i
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ is usually caused by not marking PSignals as immutable.
%fragment("t_out_helper"{Type},"header",
fragment="t_output_helper") {}
%typemap(argout,fragment="t_out_helper"{Type}) Type *OUTPUT, Type &OUTPUT
#if SWIG_VERSION >= 0x040300
"$result = SWIG_Python_AppendOutput($result, (SWIG_NewPointerObj((void*)($1), $1_descriptor, 1)), 1);"
#else
"$result = t_output_helper($result, (SWIG_NewPointerObj((void*)($1), $1_descriptor, 1)));"
#endif
%enddef
%define %typemap_output_ptr(Type)
Expand All @@ -147,7 +151,11 @@ is usually caused by not marking PSignals as immutable.
fragment="t_output_helper") {}
%typemap(argout,fragment="t_out_helper"{Type}) Type *OUTPUT, Type &OUTPUT
// generate None if smartpointer is NULL
#if SWIG_VERSION >= 0x040300
"$result = SWIG_Python_AppendOutput($result, ((*$1) ? SWIG_NewPointerObj((void*)($1), $1_descriptor, 1) : (delete $1, Py_INCREF(Py_None), Py_None)), 1);"
#else
"$result = t_output_helper($result, ((*$1) ? SWIG_NewPointerObj((void*)($1), $1_descriptor, 1) : (delete $1, Py_INCREF(Py_None), Py_None)));"
#endif
%enddef
Expand Down

0 comments on commit b418c08

Please sign in to comment.