From 837a49c727770066a0a06801ff69de47824be229 Mon Sep 17 00:00:00 2001 From: brandon-b-miller <53796099+brandon-b-miller@users.noreply.github.com> Date: Wed, 9 Nov 2022 10:27:59 -0600 Subject: [PATCH] Update python/strings_udf/strings_udf/lowering.py Co-authored-by: Vyas Ramasubramani --- python/strings_udf/strings_udf/lowering.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/strings_udf/strings_udf/lowering.py b/python/strings_udf/strings_udf/lowering.py index 3dfc2b1c413..49ba77ee996 100644 --- a/python/strings_udf/strings_udf/lowering.py +++ b/python/strings_udf/strings_udf/lowering.py @@ -190,7 +190,11 @@ def binary_func_impl(context, builder, sig, args): # binary function of two strings yielding a new string # example: str.strip(other) -> str # shim functions can not return a struct due to C linkage - # so we operate on an extra void ptr and throw away nb_retval + # so we create a new udf_string and pass a pointer to it + # for the shim function to write the output to. The return + # value of compile_internal is therefore discarded (although + # this may change in the future if we need to return error + # codes, for instance). udf_str_ptr = builder.alloca( default_manager[udf_string].get_value_type() )