Commit e7486812 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix SWIG access to raw pointer with proxy classes

parent e8e29299
......@@ -178,7 +178,13 @@ class sdlHandler(QObject):
# get internal variables, translate them to swig, and print them
setter_ptr = getattr(self.dll, "_set_{}".format(var))
value_asn1 = target_state[idx]
value_ptr = ctypes.cast(value_asn1._ptr.__long__(),
value_swig_ptr = int(value_asn1._ptr)
except TypeError:
# for some types, swig uses a proxy class, in which case the
# pointer is not in _ptr but in _ptr.this
value_swig_ptr = int(value_asn1._ptr.this)
value_ptr = ctypes.cast(value_swig_ptr,
state_value = target_state[idx+1]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment