From 4b493d633cdbcf36881a59b8bac8fee20e99680f Mon Sep 17 00:00:00 2001 From: Perl 5 Porters Date: Tue, 9 Jan 1996 03:02:51 +0000 Subject: perl 5.002beta2 patch: pod/perlembed.pod Give correct usage for the 5th arg to perl_parse (don't pass env). --- pod/perlembed.pod | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'pod/perlembed.pod') diff --git a/pod/perlembed.pod b/pod/perlembed.pod index 2f0e9c30fb..c86f550f15 100644 --- a/pod/perlembed.pod +++ b/pod/perlembed.pod @@ -117,11 +117,11 @@ I containing the essentials of embedding: static PerlInterpreter *my_perl; /*** The Perl interpreter ***/ - int main(int argc, char **argv, char **env) + int main(int argc, char **argv) { my_perl = perl_alloc(); perl_construct(my_perl); - perl_parse(my_perl, NULL, argc, argv, env); + perl_parse(my_perl, NULL, argc, argv, (char **) NULL); perl_run(my_perl); perl_destruct(my_perl); perl_free(my_perl); @@ -164,12 +164,12 @@ That's shown below, in a program I'll call I. static PerlInterpreter *my_perl; - int main(int argc, char **argv, char **env) + int main(int argc, char **argv) { my_perl = perl_alloc(); perl_construct(my_perl); - perl_parse(my_perl, NULL, argc, argv, env); + perl_parse(my_perl, NULL, argc, argv, (char **) NULL); /*** This replaces perl_run() ***/ perl_call_argv("showtime", G_DISCARD | G_NOARGS, argv); @@ -241,7 +241,7 @@ the first, a C from the second, and a C from the third. perl_call_argv("_eval_", 0, argv); } - main (int argc, char **argv, char **env) + main (int argc, char **argv) { char *embedding[] = { "", "-e", "sub _eval_ { eval $_[0] }" }; STRLEN length; @@ -249,7 +249,7 @@ the first, a C from the second, and a C from the third. my_perl = perl_alloc(); perl_construct( my_perl ); - perl_parse(my_perl, NULL, 3, embedding, env); + perl_parse(my_perl, NULL, 3, embedding, (char **) NULL); /** Treat $a as an integer **/ perl_eval("$a = 3; $a **= 2"); @@ -388,7 +388,7 @@ Here's a sample program, I, that uses all three: return num_matches; } - main (int argc, char **argv, char **env) + main (int argc, char **argv) { char *embedding[] = { "", "-e", "sub _eval_ { eval $_[0] }" }; char *text, **matches; @@ -398,7 +398,7 @@ Here's a sample program, I, that uses all three: my_perl = perl_alloc(); perl_construct( my_perl ); - perl_parse(my_perl, NULL, 3, embedding, env); + perl_parse(my_perl, NULL, 3, embedding, (char **) NULL); text = (char *) malloc(sizeof(char) * 486); /** A long string follows! **/ sprintf(text, "%s", "When he is at a convenience store and the bill comes to some amount like 76 cents, Maynard is aware that there is something he *should* do, something that will enable him to get back a quarter, but he has no idea *what*. He fumbles through his red squeezey changepurse and gives the boy three extra pennies with his dollar, hoping that he might luck into the correct amount. The boy gives him back two of his own pennies and then the big shiny quarter that is his prize. -RICHH"); @@ -517,7 +517,7 @@ deep breath... LEAVE; /* ...and the XPUSHed "mortal" args.*/ } - int main (int argc, char **argv, char **env) + int main (int argc, char **argv) { char *my_argv[2]; @@ -527,7 +527,7 @@ deep breath... my_argv[1] = (char *) malloc(10); sprintf(my_argv[1], "power.pl"); - perl_parse(my_perl, NULL, argc, my_argv, env); + perl_parse(my_perl, NULL, argc, my_argv, (char **) NULL); PerlPower(3, 4); /*** Compute 3 ** 4 ***/ -- cgit v1.2.1