in reply to Calling PERL from C code - How to "build" a hash on the PERL stack before calling the function?

but I don't know how the HASH should be built on the stack.

Why not?

Do you know how a hash should be built in perl code?

Couldn't you simply  call_pv("make_hash_from_list_on_stack"... then  call_pv( perlCbFuncName...

sub make_hash_from_list_on_stack { my @fromStack = @_; ... @_ = @newStack; return; }
  • Comment on Re: Calling PERL from C code - How to "build" a hash on the PERL stack before calling the function?
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Calling PERL from C code - How to "build" a hash on the PERL stack before calling the function?
by itamarat (Acolyte) on Jul 07, 2014 at 09:13 UTC
    Thanks for the suggestion!

    Currently, I prefer that all the "preperations" of the parameters will be done within C code.

    Best regards,

    Itamar