This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1c897a
)
[BUG] perlembed.pod:power.c example
author
Doug MacEachern
<dougm@opengroup.org>
Thu, 17 Jul 1997 11:04:28 +0000
(23:04 +1200)
committer
Tim Bunce
<Tim.Bunce@ig.co.uk>
Wed, 6 Aug 1997 12:00:00 +0000
(
00:00
+1200)
I think this one has been around since perlembed.pod first became more
than "Look at perlmain.c and do something like that" :-) This is on
top of the patch I sent the other day.
p5p-msgid:
199707181344
.JAA10565@postman.opengroup.org
pod/perlembed.pod
patch
|
blob
|
blame
|
history
diff --git
a/pod/perlembed.pod
b/pod/perlembed.pod
index
378a7d6
..
e1ab91e
100644
(file)
--- 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 ***/