X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlembed.pod;h=c43ed556aa72e0d068e101d89a70ab9329641ca8;hb=51cf62d8ec31d46fecbc8564c5b48c17f5776f7f;hp=378a7d643518c8673b9d543fa9b6eb2a795ba008;hpb=1f05cdcd801dde12befb818184a1494d9bbd1028;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlembed.pod b/pod/perlembed.pod index 378a7d6..c43ed55 100644 --- a/pod/perlembed.pod +++ b/pod/perlembed.pod @@ -578,15 +578,12 @@ deep breath... int main (int argc, char **argv, char **env) { - char *my_argv[2]; + char *my_argv[] = { "", "power.pl" }; my_perl = perl_alloc(); perl_construct( my_perl ); - my_argv[1] = (char *) malloc(10); - sprintf(my_argv[1], "power.pl"); - - perl_parse(my_perl, NULL, argc, my_argv, NULL); + perl_parse(my_perl, NULL, 2, my_argv, (char **)NULL); perl_run(my_perl); PerlPower(3, 4); /*** Compute 3 ** 4 ***/ @@ -1013,7 +1010,7 @@ Dov Grobgeld, and Ilya Zakharevich. Check out Doug's article on embedding in Volume 1, Issue 4 of The Perl Journal. Info about TPJ is available from http://tpj.com. -April 14, 1997 +July 17, 1997 Some of this material is excerpted from Jon Orwant's book: I, Waite Group Press, 1996 (ISBN 1-57169-064-6) and appears