Use native-size integers for some global counters
authorSteffen Mueller <smueller@cpan.org>
Wed, 27 Feb 2013 17:12:28 +0000 (18:12 +0100)
committerSteffen Mueller <smueller@cpan.org>
Wed, 27 Feb 2013 21:37:46 +0000 (22:37 +0100)
It may be unlikely that a Perl program will hit 2 billion SVs, but by
the time that 5.18 is ancient history, it's looking a lot more likely.
This makes two global counters use native-size ints.

I'm preserving signedness just for hysterical raisins: It might be
deliberate.

intrpvar.h

index 852f9a046635ae5f7eccbfa1a8b6fd034e66882c..92d8e9275ad72b2115eecb021c0da2bec7ce8d02 100644 (file)
@@ -45,7 +45,7 @@ PERLVAR(I, stack_max, SV **)
 
 PERLVAR(I, scopestack, I32 *)          /* scopes we've ENTERed */
 /* name of the scopes we've ENTERed. Only used with -DDEBUGGING, but needs to be
-   present always, as -DDEUBGGING must be binary compatible with non.  */
+   present always, as -DDEBUGGING must be binary compatible with non.  */
 PERLVARI(I, scopestack_name, const char * *, NULL)
 PERLVAR(I, scopestack_ix, I32)
 PERLVAR(I, scopestack_max, I32)
@@ -382,8 +382,8 @@ PERLVARI(I, sub_generation, U32, 1) /* incr to invalidate method cache */
 PERLVAR(I, forkprocess,        int)            /* so do_open |- can return proc# */
 
 /* memory management */
-PERLVAR(I, sv_count,   I32)            /* how many SV* are currently allocated */
-PERLVAR(I, sv_objcount,        I32)            /* how many objects are currently allocated */
+PERLVAR(I, sv_count,   IV)             /* how many SV* are currently allocated */
+PERLVAR(I, sv_objcount,        IV)             /* how many objects are currently allocated */
 PERLVAR(I, sv_root,    SV *)           /* storage for SVs belonging to interp */
 PERLVAR(I, sv_arenaroot, SV *)         /* list of areas for garbage collection */