From 7fd00a267ec3ea02571a14bb3f4e730bea5f8dbc Mon Sep 17 00:00:00 2001 From: depetrol Date: Fri, 11 Oct 2024 13:28:35 -0700 Subject: [PATCH 1/2] fix concurrency --- python/lib/pythontarget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/lib/pythontarget.c b/python/lib/pythontarget.c index ae43959d3..5981ae7a4 100644 --- a/python/lib/pythontarget.c +++ b/python/lib/pythontarget.c @@ -542,7 +542,8 @@ PyObject* convert_C_action_to_py(void* action) { } // Actions in Python always use token type - ((generic_action_capsule_struct*)cap)->value = trigger->tmplt.token->value; + if ((( generic_action_instance_struct*)action)->token!=NULL) + ((generic_action_capsule_struct*)cap)->value = (( generic_action_instance_struct*)action)->token->value; return cap; } From 0031be283fb3bf1cb6561fe0cb2c9604ecbb0ef1 Mon Sep 17 00:00:00 2001 From: depetrol Date: Fri, 11 Oct 2024 13:31:58 -0700 Subject: [PATCH 2/2] format --- python/lib/pythontarget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/lib/pythontarget.c b/python/lib/pythontarget.c index 5981ae7a4..8e41f40f9 100644 --- a/python/lib/pythontarget.c +++ b/python/lib/pythontarget.c @@ -542,8 +542,8 @@ PyObject* convert_C_action_to_py(void* action) { } // Actions in Python always use token type - if ((( generic_action_instance_struct*)action)->token!=NULL) - ((generic_action_capsule_struct*)cap)->value = (( generic_action_instance_struct*)action)->token->value; + if (((generic_action_instance_struct*)action)->token != NULL) + ((generic_action_capsule_struct*)cap)->value = ((generic_action_instance_struct*)action)->token->value; return cap; }