From: Alexey Tourbin Date: Sun, 5 Jun 2005 00:00:00 +0000 (+0000) Subject: make some more functions static X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f681a178ed5ab9eaae71b97c6eea3744c0304d67;p=p5sagit%2Fp5-mst-13.2.git make some more functions static 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 --- diff --git a/ext/B/C/C.xs b/ext/B/C/C.xs index 3c52e4a..92e4ce5 100644 --- a/ext/B/C/C.xs +++ b/ext/B/C/C.xs @@ -2,7 +2,7 @@ #include #include -int +static int my_runops(pTHX) { HV* regexp_hv = get_hv( "B::C::REGEXP", 0 ); diff --git a/ext/Devel/Peek/Peek.xs b/ext/Devel/Peek/Peek.xs index 4de466e..5bec844 100644 --- a/ext/Devel/Peek/Peek.xs +++ b/ext/Devel/Peek/Peek.xs @@ -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"); diff --git a/ext/File/Glob/Glob.xs b/ext/File/Glob/Glob.xs index 40a0fbc..3a526fb 100644 --- a/ext/File/Glob/Glob.xs +++ b/ext/File/Glob/Glob.xs @@ -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); }