1################################################################################
2#
3#            !!!!!   Do NOT edit this file directly!   !!!!!
4#
5#            Edit mktests.PL and/or parts/inc/ppphtest instead.
6#
7################################################################################
8
9BEGIN {
10  if ($ENV{'PERL_CORE'}) {
11    chdir 't' if -d 't';
12    @INC = ('../lib', '../ext/Devel/PPPort/t') if -d '../lib' && -d '../ext';
13    require Config; import Config;
14    use vars '%Config';
15    if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
16      print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
17      exit 0;
18    }
19  }
20  else {
21    unshift @INC, 't';
22  }
23
24  eval "use Test";
25  if ($@) {
26    require 'testutil.pl';
27    print "1..197\n";
28  }
29  else {
30    plan(tests => 197);
31  }
32}
33
34use Devel::PPPort;
35use strict;
36$^W = 1;
37
38use File::Path qw/rmtree mkpath/;
39use Config;
40
41my $tmp = 'ppptmp';
42my $inc = '';
43my $perl = find_perl();
44my $isVMS = $^O eq 'VMS';
45my $isMAC = $^O eq 'MacOS';
46
47rmtree($tmp) if -d $tmp;
48mkpath($tmp) or die "mkpath $tmp: $!\n";
49chdir($tmp) or die "chdir $tmp: $!\n";
50
51if ($ENV{'PERL_CORE'}) {
52  if (-d '../../lib') {
53    if ($isVMS) {
54      $inc = '"-I../../lib"';
55    }
56    elsif ($isMAC) {
57      $inc = '-I:::lib';
58    }
59    else {
60      $inc = '-I../../lib';
61    }
62    unshift @INC, '../../lib';
63  }
64}
65if ($perl =~ m!^\./!) {
66  $perl = ".$perl";
67}
68
69END {
70  chdir('..') if !-d $tmp && -d "../$tmp";
71  rmtree($tmp) if -d $tmp;
72}
73
74ok(&Devel::PPPort::WriteFile("ppport.h"));
75
76sub comment
77{
78  my $c = shift;
79  $c =~ s/^/# | /mg;
80  $c .= "\n" unless $c =~ /[\r\n]$/;
81  print $c;
82}
83
84sub ppport
85{
86  my @args = ('ppport.h', @_);
87  unshift @args, $inc if $inc;
88  my $run = $perl =~ m/\s/ ? qq("$perl") : $perl;
89  $run .= ' -MMac::err=unix' if $isMAC;
90  for (@args) {
91    $_ = qq("$_") if $isVMS && /^[^"]/;
92    $run .= " $_";
93  }
94  print "# *** running $run ***\n";
95  $run .= ' 2>&1' unless $isMAC;
96  my @out = `$run`;
97  my $out = join '', @out;
98  comment($out);
99  return wantarray ? @out : $out;
100}
101
102sub matches
103{
104  my($str, $re, $mod) = @_;
105  my @n;
106  eval "\@n = \$str =~ /$re/g$mod;";
107  if ($@) {
108    my $err = $@;
109    $err =~ s/^/# *** /mg;
110    print "# *** ERROR ***\n$err\n";
111  }
112  return $@ ? -42 : scalar @n;
113}
114
115sub eq_files
116{
117  my($f1, $f2) = @_;
118  return 0 unless -e $f1 && -e $f2;
119  local *F;
120  for ($f1, $f2) {
121    print "# File: $_\n";
122    unless (open F, $_) {
123      print "# couldn't open $_: $!\n";
124      return 0;
125    }
126    $_ = do { local $/; <F> };
127    close F;
128    comment($_);
129  }
130  return $f1 eq $f2;
131}
132
133my @tests;
134
135for (split /\s*={70,}\s*/, do { local $/; <DATA> }) {
136  s/^\s+//; s/\s+$//;
137  my($c, %f);
138  ($c, @f{m/-{20,}\s+(\S+)\s+-{20,}/g}) = split /\s*-{20,}\s+\S+\s+-{20,}\s*/;
139  push @tests, { code => $c, files => \%f };
140}
141
142my $t;
143for $t (@tests) {
144  my $f;
145  for $f (keys %{$t->{files}}) {
146    my @f = split /\//, $f;
147    if (@f > 1) {
148      pop @f;
149      my $path = join '/', @f;
150      mkpath($path) or die "mkpath('$path'): $!\n";
151    }
152    my $txt = $t->{files}{$f};
153    local *F;
154    open F, ">$f" or die "open $f: $!\n";
155    print F "$txt\n";
156    close F;
157    $txt =~ s/^/# | /mg;
158    print "# *** writing $f ***\n$txt\n";
159  }
160
161  eval $t->{code};
162  if ($@) {
163    my $err = $@;
164    $err =~ s/^/# *** /mg;
165    print "# *** ERROR ***\n$err\n";
166  }
167  ok($@, '');
168
169  for (keys %{$t->{files}}) {
170    unlink $_ or die "unlink('$_'): $!\n";
171  }
172}
173
174sub find_perl
175{
176  my $perl = $^X;
177
178  return $perl if $isVMS;
179
180  my $exe = $Config{'_exe'} || '';
181
182  if ($perl =~ /^perl\Q$exe\E$/i) {
183    $perl = "perl$exe";
184    eval "require File::Spec";
185    if ($@) {
186      $perl = "./$perl";
187    } else {
188      $perl = File::Spec->catfile(File::Spec->curdir(), $perl);
189    }
190  }
191
192  if ($perl !~ /\Q$exe\E$/i) {
193    $perl .= $exe;
194  }
195
196  warn "find_perl: cannot find $perl from $^X" unless -f $perl;
197
198  return $perl;
199}
200
201__DATA__
202
203my $o = ppport(qw(--help));
204ok($o =~ /^Usage:.*ppport\.h/m);
205ok($o =~ /--help/m);
206
207$o = ppport(qw(--nochanges));
208ok($o =~ /^Scanning.*test\.xs/mi);
209ok($o =~ /Analyzing.*test\.xs/mi);
210ok(matches($o, '^Scanning', 'm'), 1);
211ok(matches($o, 'Analyzing', 'm'), 1);
212ok($o =~ /Uses Perl_newSViv instead of newSViv/);
213
214$o = ppport(qw(--quiet --nochanges));
215ok($o =~ /^\s*$/);
216
217---------------------------- test.xs ------------------------------------------
218
219Perl_newSViv();
220
221===============================================================================
222
223# check if C and C++ comments are filtered correctly
224
225my $o = ppport(qw(--copy=a));
226ok($o =~ /^Scanning.*MyExt\.xs/mi);
227ok($o =~ /Analyzing.*MyExt\.xs/mi);
228ok(matches($o, '^Scanning', 'm'), 1);
229ok($o =~ /^Needs to include.*ppport\.h/m);
230ok($o !~ /^Uses grok_bin/m);
231ok($o !~ /^Uses newSVpv/m);
232ok($o =~ /Uses 1 C\+\+ style comment/m);
233ok(eq_files('MyExt.xsa', 'MyExt.ra'));
234
235# check if C++ are left untouched with --cplusplus
236
237$o = ppport(qw(--copy=b --cplusplus));
238ok($o =~ /^Scanning.*MyExt\.xs/mi);
239ok($o =~ /Analyzing.*MyExt\.xs/mi);
240ok(matches($o, '^Scanning', 'm'), 1);
241ok($o =~ /^Needs to include.*ppport\.h/m);
242ok($o !~ /^Uses grok_bin/m);
243ok($o !~ /^Uses newSVpv/m);
244ok($o !~ /Uses \d+ C\+\+ style comment/m);
245ok(eq_files('MyExt.xsb', 'MyExt.rb'));
246
247unlink qw(MyExt.xsa MyExt.xsb);
248
249---------------------------- MyExt.xs -----------------------------------------
250
251newSVuv();
252    // newSVpv();
253  XPUSHs(foo);
254/* grok_bin(); */
255
256---------------------------- MyExt.ra -----------------------------------------
257
258#include "ppport.h"
259newSVuv();
260    /* newSVpv(); */
261  XPUSHs(foo);
262/* grok_bin(); */
263
264---------------------------- MyExt.rb -----------------------------------------
265
266#include "ppport.h"
267newSVuv();
268    // newSVpv();
269  XPUSHs(foo);
270/* grok_bin(); */
271
272===============================================================================
273
274my $o = ppport(qw(--nochanges file1.xs));
275ok($o =~ /^Scanning.*file1\.xs/mi);
276ok($o =~ /Analyzing.*file1\.xs/mi);
277ok($o !~ /^Scanning.*file2\.xs/mi);
278ok($o =~ /^Uses newCONSTSUB/m);
279ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_nolen/m);
280ok($o =~ /hint for newCONSTSUB/m);
281ok($o !~ /hint for sv_2pv_nolen/m);
282ok($o =~ /^Looks good/m);
283
284$o = ppport(qw(--nochanges --nohints file1.xs));
285ok($o =~ /^Scanning.*file1\.xs/mi);
286ok($o =~ /Analyzing.*file1\.xs/mi);
287ok($o !~ /^Scanning.*file2\.xs/mi);
288ok($o =~ /^Uses newCONSTSUB/m);
289ok($o =~ /^Uses SvPV_nolen.*depends.*sv_2pv_nolen/m);
290ok($o !~ /hint for newCONSTSUB/m);
291ok($o !~ /hint for sv_2pv_nolen/m);
292ok($o =~ /^Looks good/m);
293
294$o = ppport(qw(--nochanges --nohints --nodiag file1.xs));
295ok($o =~ /^Scanning.*file1\.xs/mi);
296ok($o =~ /Analyzing.*file1\.xs/mi);
297ok($o !~ /^Scanning.*file2\.xs/mi);
298ok($o !~ /^Uses newCONSTSUB/m);
299ok($o !~ /^Uses SvPV_nolen/m);
300ok($o !~ /hint for newCONSTSUB/m);
301ok($o !~ /hint for sv_2pv_nolen/m);
302ok($o =~ /^Looks good/m);
303
304$o = ppport(qw(--nochanges --quiet file1.xs));
305ok($o =~ /^\s*$/);
306
307$o = ppport(qw(--nochanges file2.xs));
308ok($o =~ /^Scanning.*file2\.xs/mi);
309ok($o =~ /Analyzing.*file2\.xs/mi);
310ok($o !~ /^Scanning.*file1\.xs/mi);
311ok($o =~ /^Uses mXPUSHp/m);
312ok($o =~ /^Needs to include.*ppport\.h/m);
313ok($o !~ /^Looks good/m);
314ok($o =~ /^1 potentially required change detected/m);
315
316$o = ppport(qw(--nochanges --nohints file2.xs));
317ok($o =~ /^Scanning.*file2\.xs/mi);
318ok($o =~ /Analyzing.*file2\.xs/mi);
319ok($o !~ /^Scanning.*file1\.xs/mi);
320ok($o =~ /^Uses mXPUSHp/m);
321ok($o =~ /^Needs to include.*ppport\.h/m);
322ok($o !~ /^Looks good/m);
323ok($o =~ /^1 potentially required change detected/m);
324
325$o = ppport(qw(--nochanges --nohints --nodiag file2.xs));
326ok($o =~ /^Scanning.*file2\.xs/mi);
327ok($o =~ /Analyzing.*file2\.xs/mi);
328ok($o !~ /^Scanning.*file1\.xs/mi);
329ok($o !~ /^Uses mXPUSHp/m);
330ok($o !~ /^Needs to include.*ppport\.h/m);
331ok($o !~ /^Looks good/m);
332ok($o =~ /^1 potentially required change detected/m);
333
334$o = ppport(qw(--nochanges --quiet file2.xs));
335ok($o =~ /^\s*$/);
336
337---------------------------- file1.xs -----------------------------------------
338
339#define NEED_newCONSTSUB
340#define NEED_sv_2pv_nolen
341#include "ppport.h"
342
343newCONSTSUB();
344SvPV_nolen();
345
346---------------------------- file2.xs -----------------------------------------
347
348mXPUSHp(foo);
349
350===============================================================================
351
352my $o = ppport(qw(--nochanges));
353ok($o =~ /^Scanning.*FooBar\.xs/mi);
354ok($o =~ /Analyzing.*FooBar\.xs/mi);
355ok(matches($o, '^Scanning', 'm'), 1);
356ok($o !~ /^Looks good/m);
357ok($o =~ /^Uses grok_bin/m);
358
359---------------------------- FooBar.xs ----------------------------------------
360
361newSViv();
362XPUSHs(foo);
363grok_bin();
364
365===============================================================================
366
367my $o = ppport(qw(--nochanges));
368ok($o =~ /^Scanning.*First\.xs/mi);
369ok($o =~ /Analyzing.*First\.xs/mi);
370ok($o =~ /^Scanning.*second\.h/mi);
371ok($o =~ /Analyzing.*second\.h/mi);
372ok($o =~ /^Scanning.*sub.*third\.c/mi);
373ok($o =~ /Analyzing.*sub.*third\.c/mi);
374ok($o !~ /^Scanning.*foobar/mi);
375ok(matches($o, '^Scanning', 'm'), 3);
376
377---------------------------- First.xs -----------------------------------------
378
379one
380
381---------------------------- foobar.xyz ---------------------------------------
382
383two
384
385---------------------------- second.h -----------------------------------------
386
387three
388
389---------------------------- sub/third.c --------------------------------------
390
391four
392
393===============================================================================
394
395my $o = ppport(qw(--nochanges));
396ok($o =~ /Possibly wrong #define NEED_foobar in.*test.xs/i);
397
398---------------------------- test.xs ------------------------------------------
399
400#define NEED_foobar
401
402===============================================================================
403
404# And now some complex "real-world" example
405
406my $o = ppport(qw(--copy=f));
407for (qw(main.xs mod1.c mod2.c mod3.c mod4.c mod5.c)) {
408  ok($o =~ /^Scanning.*\Q$_\E/mi);
409  ok($o =~ /Analyzing.*\Q$_\E/i);
410}
411ok(matches($o, '^Scanning', 'm'), 6);
412
413ok(matches($o, '^Writing copy of', 'm'), 5);
414ok(!-e "mod5.cf");
415
416for (qw(main.xs mod1.c mod2.c mod3.c mod4.c)) {
417  ok($o =~ /^Writing copy of.*\Q$_\E.*with changes/mi);
418  ok(-e "${_}f");
419  ok(eq_files("${_}f", "${_}r"));
420  unlink "${_}f";
421}
422
423---------------------------- main.xs ------------------------------------------
424
425#include "EXTERN.h"
426#include "perl.h"
427#include "XSUB.h"
428
429#define NEED_newCONSTSUB
430#define NEED_grok_hex_GLOBAL
431#include "ppport.h"
432
433newCONSTSUB();
434grok_hex();
435Perl_grok_bin(aTHX_ foo, bar);
436
437/* some comment */
438
439perl_eval_pv();
440grok_bin();
441Perl_grok_bin(bar, sv_no);
442
443---------------------------- mod1.c -------------------------------------------
444
445#include "EXTERN.h"
446#include "perl.h"
447#include "XSUB.h"
448
449#define NEED_grok_bin_GLOBAL
450#define NEED_newCONSTSUB
451#include "ppport.h"
452
453newCONSTSUB();
454grok_bin();
455{
456  Perl_croak ("foo");
457  Perl_sv_catpvf();  /* I know it's wrong ;-) */
458}
459
460---------------------------- mod2.c -------------------------------------------
461
462#include "EXTERN.h"
463#include "perl.h"
464#include "XSUB.h"
465
466#define NEED_eval_pv
467#include "ppport.h"
468
469newSViv();
470
471/*
472   eval_pv();
473*/
474
475---------------------------- mod3.c -------------------------------------------
476
477#include "EXTERN.h"
478#include "perl.h"
479#include "XSUB.h"
480
481grok_oct();
482eval_pv();
483
484---------------------------- mod4.c -------------------------------------------
485
486#include "EXTERN.h"
487#include "perl.h"
488#include "XSUB.h"
489
490START_MY_CXT;
491
492---------------------------- mod5.c -------------------------------------------
493
494#include "EXTERN.h"
495#include "perl.h"
496#include "XSUB.h"
497
498#include "ppport.h"
499call_pv();
500
501---------------------------- main.xsr -----------------------------------------
502
503#include "EXTERN.h"
504#include "perl.h"
505#include "XSUB.h"
506
507#define NEED_eval_pv_GLOBAL
508#define NEED_grok_hex
509#define NEED_newCONSTSUB_GLOBAL
510#include "ppport.h"
511
512newCONSTSUB();
513grok_hex();
514grok_bin(foo, bar);
515
516/* some comment */
517
518eval_pv();
519grok_bin();
520grok_bin(bar, PL_sv_no);
521
522---------------------------- mod1.cr ------------------------------------------
523
524#include "EXTERN.h"
525#include "perl.h"
526#include "XSUB.h"
527
528#define NEED_grok_bin_GLOBAL
529#include "ppport.h"
530
531newCONSTSUB();
532grok_bin();
533{
534  Perl_croak (aTHX_ "foo");
535  Perl_sv_catpvf(aTHX);  /* I know it's wrong ;-) */
536}
537
538---------------------------- mod2.cr ------------------------------------------
539
540#include "EXTERN.h"
541#include "perl.h"
542#include "XSUB.h"
543
544
545newSViv();
546
547/*
548   eval_pv();
549*/
550
551---------------------------- mod3.cr ------------------------------------------
552
553#include "EXTERN.h"
554#include "perl.h"
555#include "XSUB.h"
556#define NEED_grok_oct
557#include "ppport.h"
558
559grok_oct();
560eval_pv();
561
562---------------------------- mod4.cr ------------------------------------------
563
564#include "EXTERN.h"
565#include "perl.h"
566#include "XSUB.h"
567#include "ppport.h"
568
569START_MY_CXT;
570
571===============================================================================
572
573my $o = ppport(qw(--nochanges));
574ok($o =~ /Uses grok_hex/m);
575ok($o !~ /Looks good/m);
576
577$o = ppport(qw(--nochanges --compat-version=5.8.0));
578ok($o !~ /Uses grok_hex/m);
579ok($o =~ /Looks good/m);
580
581---------------------------- FooBar.xs ----------------------------------------
582
583grok_hex();
584
585===============================================================================
586
587my $o = ppport(qw(--nochanges));
588ok($o =~ /Uses SvPVutf8_force, which may not be portable/m);
589
590$o = ppport(qw(--nochanges --compat-version=5.5.3));
591ok($o =~ /Uses SvPVutf8_force, which may not be portable/m);
592
593$o = ppport(qw(--nochanges --compat-version=5.005_03));
594ok($o =~ /Uses SvPVutf8_force, which may not be portable/m);
595
596$o = ppport(qw(--nochanges --compat-version=5.6.0));
597ok($o !~ /Uses SvPVutf8_force/m);
598
599$o = ppport(qw(--nochanges --compat-version=5.006));
600ok($o !~ /Uses SvPVutf8_force/m);
601
602$o = ppport(qw(--nochanges --compat-version=5.999.999));
603ok($o !~ /Uses SvPVutf8_force/m);
604
605$o = ppport(qw(--nochanges --compat-version=6.0.0));
606ok($o =~ /Only Perl 5 is supported/m);
607
608$o = ppport(qw(--nochanges --compat-version=5.1000.999));
609ok($o =~ /Invalid version number: 5.1000.999/m);
610
611$o = ppport(qw(--nochanges --compat-version=5.999.1000));
612ok($o =~ /Invalid version number: 5.999.1000/m);
613
614---------------------------- FooBar.xs ----------------------------------------
615
616SvPVutf8_force();
617
618===============================================================================
619
620my $o = ppport(qw(--nochanges));
621ok($o !~ /potentially required change/);
622ok(matches($o, '^Looks good', 'm'), 2);
623
624---------------------------- FooBar.xs ----------------------------------------
625
626#define NEED_grok_numeric_radix
627#define NEED_grok_number
628#include "ppport.h"
629
630GROK_NUMERIC_RADIX();
631grok_number();
632
633---------------------------- foo.c --------------------------------------------
634
635#include "ppport.h"
636
637call_pv();
638
639===============================================================================
640
641# check --api-info option
642
643my $o = ppport(qw(--api-info=INT2PTR));
644my %found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
645ok(scalar keys %found, 1);
646ok(exists $found{INT2PTR});
647ok(matches($o, '^Supported at least starting from perl-5\.6\.0\.', 'm'), 1);
648ok(matches($o, '^Support by .*ppport.* provided back to perl-5\.003\.', 'm'), 1);
649
650$o = ppport(qw(--api-info=Zero));
651%found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
652ok(scalar keys %found, 1);
653ok(exists $found{Zero});
654ok(matches($o, '^No portability information available\.', 'm'), 1);
655
656$o = ppport(qw(--api-info=/Zero/));
657%found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
658ok(scalar keys %found, 2);
659ok(exists $found{Zero});
660ok(exists $found{ZeroD});
661
662===============================================================================
663
664# check --list-provided option
665
666my @o = ppport(qw(--list-provided));
667my %p;
668my $fail = 0;
669for (@o) {
670  my($name, $flags) = /^(\w+)(?:\s+\[(\w+(?:,\s+\w+)*)\])?$/ or $fail++;
671  exists $p{$name} and $fail++;
672  $p{$name} = defined $flags ? { map { ($_ => 1) } $flags =~ /(\w+)/g } : '';
673}
674ok(@o > 100);
675ok($fail, 0);
676
677ok(exists $p{call_sv});
678ok(not ref $p{call_sv});
679
680ok(exists $p{grok_bin});
681ok(ref $p{grok_bin}, 'HASH');
682ok(scalar keys %{$p{grok_bin}}, 1);
683ok($p{grok_bin}{explicit});
684
685ok(exists $p{gv_stashpvn});
686ok(ref $p{gv_stashpvn}, 'HASH');
687ok(scalar keys %{$p{gv_stashpvn}}, 1);
688ok($p{gv_stashpvn}{hint});
689
690ok(exists $p{sv_catpvf_mg});
691ok(ref $p{sv_catpvf_mg}, 'HASH');
692ok(scalar keys %{$p{sv_catpvf_mg}}, 2);
693ok($p{sv_catpvf_mg}{explicit});
694ok($p{sv_catpvf_mg}{depend});
695
696===============================================================================
697
698# check --list-unsupported option
699
700my @o = ppport(qw(--list-unsupported));
701my %p;
702my $fail = 0;
703for (@o) {
704  my($name, $ver) = /^(\w+)\s*\.+\s*([\d._]+)$/ or $fail++;
705  exists $p{$name} and $fail++;
706  $p{$name} = $ver;
707}
708ok(@o > 100);
709ok($fail, 0);
710
711ok(exists $p{utf8_distance});
712ok($p{utf8_distance}, '5.6.0');
713
714ok(exists $p{save_generic_svref});
715ok($p{save_generic_svref}, '5.005_03');
716
717===============================================================================
718
719# check --nofilter option
720
721my $o = ppport(qw(--nochanges));
722ok($o =~ /^Scanning.*foo\.cpp/mi);
723ok($o =~ /Analyzing.*foo\.cpp/mi);
724ok(matches($o, '^Scanning', 'm'), 1);
725ok(matches($o, 'Analyzing', 'm'), 1);
726
727$o = ppport(qw(--nochanges foo.cpp foo.o Makefile.PL));
728ok($o =~ /Skipping the following files \(use --nofilter to avoid this\):/m);
729ok(matches($o, '^\|\s+foo\.o', 'mi'), 1);
730ok(matches($o, '^\|\s+Makefile\.PL', 'mi'), 1);
731ok($o =~ /^Scanning.*foo\.cpp/mi);
732ok($o =~ /Analyzing.*foo\.cpp/mi);
733ok(matches($o, '^Scanning', 'm'), 1);
734ok(matches($o, 'Analyzing', 'm'), 1);
735
736$o = ppport(qw(--nochanges --nofilter foo.cpp foo.o Makefile.PL));
737ok($o =~ /^Scanning.*foo\.cpp/mi);
738ok($o =~ /Analyzing.*foo\.cpp/mi);
739ok($o =~ /^Scanning.*foo\.o/mi);
740ok($o =~ /Analyzing.*foo\.o/mi);
741ok($o =~ /^Scanning.*Makefile/mi);
742ok($o =~ /Analyzing.*Makefile/mi);
743ok(matches($o, '^Scanning', 'm'), 3);
744ok(matches($o, 'Analyzing', 'm'), 3);
745
746---------------------------- foo.cpp ------------------------------------------
747
748newSViv();
749
750---------------------------- foo.o --------------------------------------------
751
752newSViv();
753
754---------------------------- Makefile.PL --------------------------------------
755
756newSViv();
757
758