make some more functions static
authorAlexey Tourbin <at@altlinux.ru>
Sun, 5 Jun 2005 00:00:00 +0000 (00:00 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 7 Jun 2005 15:58:23 +0000 (15:58 +0000)
Subject: [PATCH] B/C/C.xs: static my_runops()
Message-ID: <20050604232451.GT5867@solemn.turbinal.org>

Subject: [PATCH] Devel/Peek/Peek.xs: make plain C functions static
Message-ID: <20050604232952.GU5867@solemn.turbinal.org>

Subject: [PATCH] File/Glob/Glob.xs: errfunc() should be static
Message-ID: <20050604233414.GV5867@solemn.turbinal.org>

all being :
Date: Sun, 5 Jun 2005

p4raw-id: //depot/perl@24734

ext/B/C/C.xs
ext/Devel/Peek/Peek.xs
ext/File/Glob/Glob.xs

index 3c52e4a..92e4ce5 100644 (file)
@@ -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 );
index 4de466e..5bec844 100644 (file)
@@ -3,7 +3,7 @@
 #include "perl.h"
 #include "XSUB.h"
 
-bool
+static bool
 _runops_debug(int flag)
 {
     dTHX;
@@ -15,7 +15,7 @@ _runops_debug(int flag)
     return d;
 }
 
-SV *
+static SV *
 DeadCode(pTHX)
 {
 #ifdef PURIFY
@@ -147,7 +147,7 @@ struct mstats_buffer
     UV buf[_NBUCKETS*4];
 };
 
-void
+static void
 _fill_mstats(struct mstats_buffer *b, int level)
 {
     dTHX;
@@ -159,7 +159,7 @@ _fill_mstats(struct mstats_buffer *b, int level)
     get_mstats(&(b->buffer), _NBUCKETS, level);
 }
 
-void
+static void
 fill_mstats(SV *sv, int level)
 {
     dTHX;
@@ -173,7 +173,7 @@ fill_mstats(SV *sv, int level)
     SvPOK_only(sv);
 }
 
-void
+static void
 _mstats_to_hv(HV *hv, const struct mstats_buffer *b, int level)
 {
     dTHX;
@@ -271,7 +271,8 @@ _mstats_to_hv(HV *hv, const struct mstats_buffer *b, int level)
        }
     }
 }
-void
+
+static void
 mstats_fillhash(SV *sv, int level)
 {
     struct mstats_buffer buf;
@@ -281,7 +282,8 @@ mstats_fillhash(SV *sv, int level)
     _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 @@ mstats2hash(SV *sv, SV *rv, int level)
     _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");
index 40a0fbc..3a526fb 100644 (file)
@@ -19,7 +19,7 @@ START_MY_CXT
 #ifdef WIN32
 #define errfunc                NULL
 #else
-int
+static int
 errfunc(const char *foo, int bar) {
   return !(bar == EACCES || bar == ENOENT || bar == ENOTDIR);
 }