C プログラムで perl ルーチンを呼び出す必要があります。perl ルーチンは次の引数を取ります:$a, $b, $c
とは整数、は文字列 (バイナリ文字を含む場合があります) です$a
。perlcallによると、呼び出しを行う手段は次のとおりです。$b
$c
I32 call_sv(SV* sv, I32 flags);
I32 call_pv(char *subname, I32 flags);
I32 call_method(char *methname, I32 flags);
I32 call_argv(char *subname, I32 flags, char **argv);
call_argv(...)しか使えないようですが、2つ質問があります
- perl ルーチンに整数を渡す方法
- (バイナリ) 文字列を perl に渡すにはどうすればよいですか?
のような機能があればいいのに
I32 call_argv(char *subname, I32 flags, int numOfArgs, SV* a, SV* b, SV *c ...);