in reply to Re^4: Extending perl with C dynamic library.
in thread Extending perl with C dynamic library.
I see you've found that perlcall documentation. Note that it contains no attempts to embed a perl interpreter into the code.use strict; use warnings; use Inline C => Config => USING => 'ParseRegExp', BUILD_NOISY => 1; use Inline C => <<'EOC'; void c_foo(void) { dSP; PUSHMARK(SP); call_pv("perl_foo", G_DISCARD|G_NOARGS); } EOC c_foo(); sub perl_foo { print "PID is $$\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Extending perl with C dynamic library.
by Martin90 (Sexton) on Aug 21, 2013 at 19:11 UTC | |
by syphilis (Archbishop) on Aug 21, 2013 at 22:30 UTC | |
by Martin90 (Sexton) on Aug 24, 2013 at 12:13 UTC |