Change 24734 by [EMAIL PROTECTED] on 2005/06/07 15:58:23

        make some more functions static
        
        Subject: [PATCH] B/C/C.xs: static my_runops()
        Message-ID: <[EMAIL PROTECTED]>
        
        Subject: [PATCH] Devel/Peek/Peek.xs: make plain C functions static
        Message-ID: <[EMAIL PROTECTED]>
        
        Subject: [PATCH] File/Glob/Glob.xs: errfunc() should be static
        Message-ID: <[EMAIL PROTECTED]>
        
        all being :
        From: Alexey Tourbin <[EMAIL PROTECTED]>
        Date: Sun, 5 Jun 2005

Affected files ...

... //depot/perl/ext/B/C/C.xs#3 edit
... //depot/perl/ext/Devel/Peek/Peek.xs#23 edit
... //depot/perl/ext/File/Glob/Glob.xs#15 edit

Differences ...

==== //depot/perl/ext/B/C/C.xs#3 (text) ====
Index: perl/ext/B/C/C.xs
--- perl/ext/B/C/C.xs#2~15154~  Sun Mar 10 19:07:03 2002
+++ perl/ext/B/C/C.xs   Tue Jun  7 08:58:23 2005
@@ -2,7 +2,7 @@
 #include <perl.h>
 #include <XSUB.h>
 
-int
+static int
 my_runops(pTHX)
 {
     HV* regexp_hv = get_hv( "B::C::REGEXP", 0 );

==== //depot/perl/ext/Devel/Peek/Peek.xs#23 (text) ====
Index: perl/ext/Devel/Peek/Peek.xs
--- perl/ext/Devel/Peek/Peek.xs#22~24702~       Fri Jun  3 15:22:43 2005
+++ perl/ext/Devel/Peek/Peek.xs Tue Jun  7 08:58:23 2005
@@ -3,7 +3,7 @@
 #include "perl.h"
 #include "XSUB.h"
 
-bool
+static bool
 _runops_debug(int flag)
 {
     dTHX;
@@ -15,7 +15,7 @@
     return d;
 }
 
-SV *
+static SV *
 DeadCode(pTHX)
 {
 #ifdef PURIFY
@@ -147,7 +147,7 @@
     UV buf[_NBUCKETS*4];
 };
 
-void
+static void
 _fill_mstats(struct mstats_buffer *b, int level)
 {
     dTHX;
@@ -159,7 +159,7 @@
     get_mstats(&(b->buffer), _NBUCKETS, level);
 }
 
-void
+static void
 fill_mstats(SV *sv, int level)
 {
     dTHX;
@@ -173,7 +173,7 @@
     SvPOK_only(sv);
 }
 
-void
+static void
 _mstats_to_hv(HV *hv, const struct mstats_buffer *b, int level)
 {
     dTHX;
@@ -271,7 +271,8 @@
        }
     }
 }
-void
+
+static void
 mstats_fillhash(SV *sv, int level)
 {
     struct mstats_buffer buf;
@@ -281,7 +282,8 @@
     _fill_mstats(&buf, level);
     _mstats_to_hv((HV *)SvRV(sv), &buf, level);
 }
-void
+
+static void
 mstats2hash(SV *sv, SV *rv, int level)
 {
     if (!(SvROK(rv) && SvTYPE(SvRV(rv)) == SVt_PVHV))
@@ -293,17 +295,19 @@
     _mstats_to_hv((HV *)SvRV(rv), (struct mstats_buffer*)SvPVX(sv), level);
 }
 #else  /* !( defined(PERL_DEBUGGING_MSTATS) || defined(DEBUGGING_MSTATS) \ ) 
*/ 
-void
+static void
 fill_mstats(SV *sv, int level)
 {
     croak("Cannot report mstats without Perl malloc");
 }
-void
+
+static void
 mstats_fillhash(SV *sv, int level)
 {
     croak("Cannot report mstats without Perl malloc");
 }
-void
+
+static void
 mstats2hash(SV *sv, SV *rv, int level)
 {
     croak("Cannot report mstats without Perl malloc");

==== //depot/perl/ext/File/Glob/Glob.xs#15 (text) ====
Index: perl/ext/File/Glob/Glob.xs
--- perl/ext/File/Glob/Glob.xs#14~22823~        Mon May 17 01:54:15 2004
+++ perl/ext/File/Glob/Glob.xs  Tue Jun  7 08:58:23 2005
@@ -19,7 +19,7 @@
 #ifdef WIN32
 #define errfunc                NULL
 #else
-int
+static int
 errfunc(const char *foo, int bar) {
   return !(bar == EACCES || bar == ENOENT || bar == ENOTDIR);
 }
End of Patch.

Reply via email to