From 269c8184fbcae4700774fd04aaaa052c976f005b Mon Sep 17 00:00:00 2001 From: Jacky Kwok <77720778+jackykwok2024@users.noreply.github.com> Date: Fri, 19 May 2023 22:01:48 -0700 Subject: [PATCH] multiport fixed --- lib/pythontarget.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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);