diff --git a/lib/pythontarget.c b/lib/pythontarget.c index 239ad40..4bec232 100644 --- a/lib/pythontarget.c +++ b/lib/pythontarget.c @@ -412,11 +412,8 @@ void destroy_action_capsule(PyObject* capsule) { * Individual ports can then later be accessed in Python code as port[idx]. */ PyObject* convert_C_port_to_py(void* port, int width) { - generic_port_instance_struct* cport; - if (width == -2) { - // Not a multiport - cport = (generic_port_instance_struct *)port; - } + generic_port_instance_struct* cport = (generic_port_instance_struct *)port; + // Create the port struct in Python PyObject* cap = (PyObject*)PyObject_GC_New(generic_port_capsule_struct, &py_port_capsule_t);