in reply to Re: Perl, C and deallocation responsibility
in thread Perl, C and deallocation responsibility

A belated further thought: you could typedef the return type (char*) to a new type-name, then have a typemap entry that handles the OUTPUT of that with that code-snippet: https://perldoc.perl.org/perlxstypemap.

Replies are listed 'Best First'.
Re^3: Perl, C and deallocation responsibility
by SheWolf (Novice) on Apr 30, 2023 at 23:01 UTC

    Thanks for those suggestions. I'll see if I can get time to play with them today.

    Given time constraints I came up with a much hackier solution (static pointer to a string which is used every call. Not thread safe, but in this case, not an issue), but I want to do it cleanly!