in reply to Re^2: Calling PERL from C code - How to "build" a hash on the PERL stack before calling the function?
in thread Calling PERL from C code - How to "build" a hash on the PERL stack before calling the function?
You can't push an HV onto the stack. Perl functions are only ever passed a list of scalars!
You can however pass a reference to a hash, which the Perl function can dereference to access the original hash.
Or you can pass alternating pairs of keys and values onto the stack. In which case, the Perl function can assign @_ to a lexical hash (my %args = @_).
|
|---|