summaryrefslogtreecommitdiff
path: root/pod/perlembed.pod
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters.nicoh.com>1996-01-09 03:02:51 +0000
committerAndy Dougherty <doughera.lafayette.edu>1996-01-09 03:02:51 +0000
commit4b493d633cdbcf36881a59b8bac8fee20e99680f (patch)
tree1c6e3156c16df64b1a7e6e2bb85de88fca6bf7b0 /pod/perlembed.pod
parentb59e3c8c16148102abaa610a4415d82ccf3208b7 (diff)
downloadperl-4b493d633cdbcf36881a59b8bac8fee20e99680f.tar.gz
perl 5.002beta2 patch: pod/perlembed.pod
Give correct usage for the 5th arg to perl_parse (don't pass env).
Diffstat (limited to 'pod/perlembed.pod')
-rw-r--r--pod/perlembed.pod20
1 files changed, 10 insertions, 10 deletions
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<miniperlmain.c> 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<showtime.c>.
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<float> from the second, and a C<char *> 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<float> from the second, and a C<char *> 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<match.c>, 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<match.c>, 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 ***/