diff options
author | Alexey Tourbin <at@altlinux.ru> | 2005-06-05 00:00:00 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-06-07 15:58:23 +0000 |
commit | f681a178ed5ab9eaae71b97c6eea3744c0304d67 (patch) | |
tree | ea8e2ee65565de799eab4ff86110e667abd8867e /ext | |
parent | dafda6d147bb18b3050b636ac1d31818028dd936 (diff) | |
download | perl-f681a178ed5ab9eaae71b97c6eea3744c0304d67.tar.gz |
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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/C/C.xs | 2 | ||||
-rw-r--r-- | ext/Devel/Peek/Peek.xs | 24 | ||||
-rw-r--r-- | ext/File/Glob/Glob.xs | 2 |
3 files changed, 16 insertions, 12 deletions
diff --git a/ext/B/C/C.xs b/ext/B/C/C.xs index 3c52e4a296..92e4ce535f 100644 --- a/ext/B/C/C.xs +++ b/ext/B/C/C.xs @@ -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 ); diff --git a/ext/Devel/Peek/Peek.xs b/ext/Devel/Peek/Peek.xs index 4de466e11d..5bec844ccd 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 40a0fbc0fc..3a526fbf03 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); } |