-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH] XS staticing in ext and dist #15004
Comments
From @bulk88I've sent this patch 2 times this week so far and it is disappearing without a trace into perl.org. Try number 3. |
From @bulk880001-XS-staticing-in-ext-and-dist.patchFrom 7787073cc7d73fca2f38c3e79a2cd214b51cbde9 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Thu, 22 Oct 2015 20:21:09 -0400
Subject: [PATCH] XS staticing in ext and dist
None of these symbols are exported on Win32 (listed in Makefile.PL with
EUMM's FUNCLIST), so they shouldn't be exported on Linux. Making them
static saves space in the SOs by removing symbol name strings, and removing
runtime plt/got indirection.
---
dist/threads-shared/lib/threads/shared.pm | 2 +-
dist/threads-shared/shared.xs | 66 +++++++++++-----------
ext/B/B.pm | 2 +-
ext/B/B.xs | 2 +-
ext/Hash-Util-FieldHash/FieldHash.xs | 36 ++++++------
ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm | 2 +-
ext/POSIX/POSIX.xs | 4 +-
ext/POSIX/lib/POSIX.pm | 2 +-
ext/PerlIO-encoding/encoding.pm | 2 +-
ext/PerlIO-encoding/encoding.xs | 22 ++++----
ext/PerlIO-mmap/mmap.pm | 2 +-
ext/PerlIO-mmap/mmap.xs | 20 +++----
ext/PerlIO-scalar/scalar.pm | 2 +-
ext/PerlIO-scalar/scalar.xs | 38 ++++++-------
ext/PerlIO-via/via.pm | 2 +-
ext/PerlIO-via/via.xs | 54 +++++++++---------
ext/arybase/arybase.pm | 2 +-
ext/arybase/arybase.xs | 2 +-
18 files changed, 131 insertions(+), 131 deletions(-)
diff --git a/dist/threads-shared/lib/threads/shared.pm b/dist/threads-shared/lib/threads/shared.pm
index cdb1990..8b0c950 100644
--- a/dist/threads-shared/lib/threads/shared.pm
+++ b/dist/threads-shared/lib/threads/shared.pm
@@ -7,7 +7,7 @@ use warnings;
use Scalar::Util qw(reftype refaddr blessed);
-our $VERSION = '1.48'; # Please update the pod, too.
+our $VERSION = '1.49'; # Please update the pod, too.
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
diff --git a/dist/threads-shared/shared.xs b/dist/threads-shared/shared.xs
index ee52fa1..664216a 100644
--- a/dist/threads-shared/shared.xs
+++ b/dist/threads-shared/shared.xs
@@ -179,7 +179,7 @@ typedef struct {
static recursive_lock_t PL_sharedsv_lock; /* Mutex protecting the shared sv space */
-void
+static void
recursive_lock_init(pTHX_ recursive_lock_t *lock)
{
Zero(lock,1,recursive_lock_t);
@@ -187,14 +187,14 @@ recursive_lock_init(pTHX_ recursive_lock_t *lock)
COND_INIT(&lock->cond);
}
-void
+static void
recursive_lock_destroy(pTHX_ recursive_lock_t *lock)
{
MUTEX_DESTROY(&lock->mutex);
COND_DESTROY(&lock->cond);
}
-void
+static void
recursive_lock_release(pTHX_ recursive_lock_t *lock)
{
MUTEX_LOCK(&lock->mutex);
@@ -207,7 +207,7 @@ recursive_lock_release(pTHX_ recursive_lock_t *lock)
MUTEX_UNLOCK(&lock->mutex);
}
-void
+static void
recursive_lock_acquire(pTHX_ recursive_lock_t *lock, const char *file, int line)
{
PERL_UNUSED_ARG(file);
@@ -276,7 +276,7 @@ typedef struct {
we free the memory for the above.
*/
-int
+static int
sharedsv_userlock_free(pTHX_ SV *sv, MAGIC *mg)
{
user_lock *ul = (user_lock *) mg->mg_ptr;
@@ -393,7 +393,7 @@ S_get_userlock(pTHX_ SV* ssv, bool create)
/* Given a private side SV tries to find if the SV has a shared backend,
* by looking for the magic.
*/
-SV *
+static SV *
Perl_sharedsv_find(pTHX_ SV *sv)
{
MAGIC *mg;
@@ -429,7 +429,7 @@ Perl_sharedsv_find(pTHX_ SV *sv)
* magics at it.
* Assumes lock is held.
*/
-void
+static void
Perl_sharedsv_associate(pTHX_ SV *sv, SV *ssv)
{
MAGIC *mg = 0;
@@ -548,7 +548,7 @@ S_sharedsv_dec(pTHX_ SV* ssv)
/* Implements Perl-level share() and :shared */
-void
+static void
Perl_sharedsv_share(pTHX_ SV *sv)
{
switch(SvTYPE(sv)) {
@@ -609,7 +609,7 @@ S_abs_2_rel_milli(double abs)
/* Do OS-specific condition timed wait */
-bool
+static bool
Perl_sharedsv_cond_timedwait(perl_cond *cond, perl_mutex *mut, double abs)
{
#if defined(NETWARE) || defined(I_MACH_CTHREADS)
@@ -730,7 +730,7 @@ S_get_RV(pTHX_ SV *sv, SV *sobj) {
/* Get magic for PERL_MAGIC_shared_scalar(n) */
-int
+static int
sharedsv_scalar_mg_get(pTHX_ SV *sv, MAGIC *mg)
{
SV *ssv = (SV *) mg->mg_ptr;
@@ -750,7 +750,7 @@ sharedsv_scalar_mg_get(pTHX_ SV *sv, MAGIC *mg)
* Used by various mg_set()-type functions.
* Assumes lock is held.
*/
-void
+static void
sharedsv_scalar_store(pTHX_ SV *sv, SV *ssv)
{
dTHXc;
@@ -809,7 +809,7 @@ sharedsv_scalar_store(pTHX_ SV *sv, SV *ssv)
/* Set magic for PERL_MAGIC_shared_scalar(n) */
-int
+static int
sharedsv_scalar_mg_set(pTHX_ SV *sv, MAGIC *mg)
{
SV *ssv = (SV*)(mg->mg_ptr);
@@ -828,7 +828,7 @@ sharedsv_scalar_mg_set(pTHX_ SV *sv, MAGIC *mg)
/* Free magic for PERL_MAGIC_shared_scalar(n) */
-int
+static int
sharedsv_scalar_mg_free(pTHX_ SV *sv, MAGIC *mg)
{
PERL_UNUSED_ARG(sv);
@@ -847,7 +847,7 @@ sharedsv_scalar_mg_free(pTHX_ SV *sv, MAGIC *mg)
/*
* Called during cloning of PERL_MAGIC_shared_scalar(n) magic in new thread
*/
-int
+static int
sharedsv_scalar_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
{
PERL_UNUSED_ARG(param);
@@ -859,7 +859,7 @@ sharedsv_scalar_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
/*
* Called during local $shared
*/
-int
+static int
sharedsv_scalar_mg_local(pTHX_ SV* nsv, MAGIC *mg)
{
MAGIC *nmg;
@@ -878,7 +878,7 @@ sharedsv_scalar_mg_local(pTHX_ SV* nsv, MAGIC *mg)
}
#endif
-const MGVTBL sharedsv_scalar_vtbl = {
+static const MGVTBL sharedsv_scalar_vtbl = {
sharedsv_scalar_mg_get, /* get */
sharedsv_scalar_mg_set, /* set */
0, /* len */
@@ -895,7 +895,7 @@ const MGVTBL sharedsv_scalar_vtbl = {
/* Get magic for PERL_MAGIC_tiedelem(p) */
-int
+static int
sharedsv_elem_mg_FETCH(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
@@ -945,7 +945,7 @@ sharedsv_elem_mg_FETCH(pTHX_ SV *sv, MAGIC *mg)
/* Set magic for PERL_MAGIC_tiedelem(p) */
-int
+static int
sharedsv_elem_mg_STORE(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
@@ -988,7 +988,7 @@ sharedsv_elem_mg_STORE(pTHX_ SV *sv, MAGIC *mg)
/* Clear magic for PERL_MAGIC_tiedelem(p) */
-int
+static int
sharedsv_elem_mg_DELETE(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
@@ -1030,7 +1030,7 @@ sharedsv_elem_mg_DELETE(pTHX_ SV *sv, MAGIC *mg)
/* Called during cloning of PERL_MAGIC_tiedelem(p) magic in new
* thread */
-int
+static int
sharedsv_elem_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
{
PERL_UNUSED_ARG(param);
@@ -1039,7 +1039,7 @@ sharedsv_elem_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
return (0);
}
-const MGVTBL sharedsv_elem_vtbl = {
+static const MGVTBL sharedsv_elem_vtbl = {
sharedsv_elem_mg_FETCH, /* get */
sharedsv_elem_mg_STORE, /* set */
0, /* len */
@@ -1056,7 +1056,7 @@ const MGVTBL sharedsv_elem_vtbl = {
/* Len magic for PERL_MAGIC_tied(P) */
-U32
+static U32
sharedsv_array_mg_FETCHSIZE(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
@@ -1076,7 +1076,7 @@ sharedsv_array_mg_FETCHSIZE(pTHX_ SV *sv, MAGIC *mg)
/* Clear magic for PERL_MAGIC_tied(P) */
-int
+static int
sharedsv_array_mg_CLEAR(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
@@ -1110,7 +1110,7 @@ sharedsv_array_mg_CLEAR(pTHX_ SV *sv, MAGIC *mg)
/* Free magic for PERL_MAGIC_tied(P) */
-int
+static int
sharedsv_array_mg_free(pTHX_ SV *sv, MAGIC *mg)
{
PERL_UNUSED_ARG(sv);
@@ -1125,11 +1125,11 @@ sharedsv_array_mg_free(pTHX_ SV *sv, MAGIC *mg)
*/
#if PERL_VERSION >= 11
int
-sharedsv_array_mg_copy(pTHX_ SV *sv, MAGIC* mg,
+static sharedsv_array_mg_copy(pTHX_ SV *sv, MAGIC* mg,
SV *nsv, const char *name, I32 namlen)
#else
int
-sharedsv_array_mg_copy(pTHX_ SV *sv, MAGIC* mg,
+static sharedsv_array_mg_copy(pTHX_ SV *sv, MAGIC* mg,
SV *nsv, const char *name, int namlen)
#endif
{
@@ -1143,7 +1143,7 @@ sharedsv_array_mg_copy(pTHX_ SV *sv, MAGIC* mg,
/* Called during cloning of PERL_MAGIC_tied(P) magic in new thread */
-int
+static int
sharedsv_array_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
{
PERL_UNUSED_ARG(param);
@@ -1152,7 +1152,7 @@ sharedsv_array_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
return (0);
}
-const MGVTBL sharedsv_array_vtbl = {
+static const MGVTBL sharedsv_array_vtbl = {
0, /* get */
0, /* set */
sharedsv_array_mg_FETCHSIZE,/* len */
@@ -1168,7 +1168,7 @@ const MGVTBL sharedsv_array_vtbl = {
/* Recursively unlocks a shared sv. */
-void
+static void
Perl_sharedsv_unlock(pTHX_ SV *ssv)
{
user_lock *ul = S_get_userlock(aTHX_ ssv, 0);
@@ -1180,7 +1180,7 @@ Perl_sharedsv_unlock(pTHX_ SV *ssv)
/* Recursive locks on a sharedsv.
* Locks are dynamically scoped at the level of the first lock.
*/
-void
+static void
Perl_sharedsv_lock(pTHX_ SV *ssv)
{
user_lock *ul;
@@ -1192,7 +1192,7 @@ Perl_sharedsv_lock(pTHX_ SV *ssv)
/* Handles calls from lock() builtin via PL_lockhook */
-void
+static void
Perl_sharedsv_locksv(pTHX_ SV *sv)
{
SV *ssv;
@@ -1211,7 +1211,7 @@ Perl_sharedsv_locksv(pTHX_ SV *sv)
* or if destroying last proxy on a shared object
*/
#ifdef PL_destroyhook
-bool
+static bool
Perl_shared_object_destroy(pTHX_ SV *sv)
{
SV *ssv;
@@ -1243,7 +1243,7 @@ S_shared_signal_hook(pTHX) {
/* Saves a space for keeping SVs wider than an interpreter. */
-void
+static void
Perl_sharedsv_init(pTHX)
{
dTHXc;
diff --git a/ext/B/B.pm b/ext/B/B.pm
index 13ab3c9..e6844d4 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -15,7 +15,7 @@ require Exporter;
# walkoptree comes from B.xs
BEGIN {
- $B::VERSION = '1.60';
+ $B::VERSION = '1.61';
@B::EXPORT_OK = ();
# Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
diff --git a/ext/B/B.xs b/ext/B/B.xs
index eb21103..b4b6a40 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -666,7 +666,7 @@ static XSPROTO(intrpvar_sv_common)
/* table that drives most of the B::*OP methods */
-const struct OP_methods {
+static const struct OP_methods {
const char *name;
U8 namelen;
U8 type; /* if op_offset_special, access is handled on a case-by-case basis */
diff --git a/ext/Hash-Util-FieldHash/FieldHash.xs b/ext/Hash-Util-FieldHash/FieldHash.xs
index 327b820..46efec6 100644
--- a/ext/Hash-Util-FieldHash/FieldHash.xs
+++ b/ext/Hash-Util-FieldHash/FieldHash.xs
@@ -19,7 +19,7 @@ typedef struct {
START_MY_CXT
/* Inquire the object registry (a lexical hash) from perl */
-HV *
+static HV *
HUF_get_ob_reg(pTHX) {
dSP;
HV* ob_reg = NULL;
@@ -47,7 +47,7 @@ HUF_get_ob_reg(pTHX) {
#define HUF_CLONE 0
#define HUF_RESET -1
-void
+static void
HUF_global(pTHX_ I32 how) {
if (how == HUF_INIT) {
MY_CXT_INIT;
@@ -66,7 +66,7 @@ HUF_global(pTHX_ I32 how) {
/* definition of id transformation */
#define HUF_OBJ_ID(x) newSVuv(PTR2UV(x))
-SV *
+static SV *
HUF_obj_id(pTHX_ SV *obj) {
SV *item = SvRV(obj);
MAGIC *mg;
@@ -94,7 +94,7 @@ HUF_obj_id(pTHX_ SV *obj) {
}
/* set up uvar magic for any sv */
-void
+static void
HUF_add_uvar_magic(
pTHX_
SV* sv, /* the sv to enchant, visible to get/set */
@@ -111,7 +111,7 @@ HUF_add_uvar_magic(
}
/* Fetch the data container of a trigger */
-AV *
+static AV *
HUF_get_trigger_content(pTHX_ SV *trigger) {
MAGIC* mg;
if (trigger && (mg = mg_find(trigger, PERL_MAGIC_uvar)))
@@ -123,7 +123,7 @@ HUF_get_trigger_content(pTHX_ SV *trigger) {
* the object's entry from the object registry. This function goes in
* the uf_set field of the uvar magic of a trigger.
*/
-I32 HUF_destroy_obj(pTHX_ IV index, SV *trigger) {
+static I32 HUF_destroy_obj(pTHX_ IV index, SV *trigger) {
PERL_UNUSED_ARG(index);
/* Do nothing if the weakref wasn't undef'd. Also don't bother
* during global destruction. (MY_CXT.ob_reg is sometimes funny there) */
@@ -155,7 +155,7 @@ I32 HUF_destroy_obj(pTHX_ IV index, SV *trigger) {
* object may * have to be deleted. The trigger is stored in the
* object registry and is also deleted when the object expires.
*/
-SV *
+static SV *
HUF_new_trigger(pTHX_ SV *obj, SV *ob_id) {
dMY_CXT;
SV* trigger = sv_rvweaken(newRV_inc(SvRV(obj)));
@@ -169,7 +169,7 @@ HUF_new_trigger(pTHX_ SV *obj, SV *ob_id) {
}
/* retrieve a trigger for obj if one exists, return NULL otherwise */
-SV *
+static SV *
HUF_ask_trigger(pTHX_ SV *ob_id) {
dMY_CXT;
HE* ent;
@@ -179,7 +179,7 @@ HUF_ask_trigger(pTHX_ SV *ob_id) {
}
/* get the trigger for an object, creating it if necessary */
-SV *
+static SV *
HUF_get_trigger0(pTHX_ SV *obj, SV *ob_id) {
SV* trigger;
if (!(trigger = HUF_ask_trigger(aTHX_ ob_id)))
@@ -187,7 +187,7 @@ HUF_get_trigger0(pTHX_ SV *obj, SV *ob_id) {
return trigger;
}
-SV *
+static SV *
HUF_get_trigger(pTHX_ SV *obj, SV *ob_id) {
SV* trigger = HUF_ask_trigger(aTHX_ ob_id);
if (!trigger)
@@ -198,7 +198,7 @@ HUF_get_trigger(pTHX_ SV *obj, SV *ob_id) {
/* mark an object (trigger) as having been used with a field
(a clenup-liability)
*/
-void
+static void
HUF_mark_field(pTHX_ SV *trigger, SV *field) {
AV* cont = HUF_get_trigger_content(aTHX_ trigger);
HV* field_tab = (HV*) *av_fetch(cont, 1, 0);
@@ -213,7 +213,7 @@ HUF_mark_field(pTHX_ SV *trigger, SV *field) {
/* The key exchange functions. They communicate with S_hv_magic_uvar_xkey
* in hv.c */
-I32 HUF_watch_key_safe(pTHX_ IV action, SV* field) {
+static I32 HUF_watch_key_safe(pTHX_ IV action, SV* field) {
MAGIC* mg = mg_find(field, PERL_MAGIC_uvar);
SV* keysv;
if (mg && (keysv = mg->mg_obj)) {
@@ -236,7 +236,7 @@ I32 HUF_watch_key_safe(pTHX_ IV action, SV* field) {
return 0;
}
-I32 HUF_watch_key_id(pTHX_ IV action, SV* field) {
+static I32 HUF_watch_key_id(pTHX_ IV action, SV* field) {
MAGIC* mg = mg_find(field, PERL_MAGIC_uvar);
SV* keysv;
PERL_UNUSED_ARG(action);
@@ -249,7 +249,7 @@ I32 HUF_watch_key_id(pTHX_ IV action, SV* field) {
return 0;
}
-int HUF_func_2mode( I32(* val)(pTHX_ IV, SV*)) {
+static int HUF_func_2mode( I32(* val)(pTHX_ IV, SV*)) {
int ans = 0;
if (val == &HUF_watch_key_id)
ans = 1;
@@ -258,7 +258,7 @@ int HUF_func_2mode( I32(* val)(pTHX_ IV, SV*)) {
return(ans);
}
-I32(* HUF_mode_2func( int mode))(pTHX_ IV, SV*) {
+static I32(* HUF_mode_2func( int mode))(pTHX_ IV, SV*) {
I32(* ans)(pTHX_ IV, SV*) = NULL;
switch (mode) {
case 1:
@@ -272,7 +272,7 @@ I32(* HUF_mode_2func( int mode))(pTHX_ IV, SV*) {
}
/* see if something is a field hash */
-int
+static int
HUF_get_status(pTHX_ HV *hash) {
int ans = 0;
if (hash && (SvTYPE(hash) == SVt_PVHV)) {
@@ -291,7 +291,7 @@ HUF_get_status(pTHX_ HV *hash) {
/* Thread support. These routines are called by CLONE (and nothing else) */
/* Fix entries for one object in all field hashes */
-void
+static void
HUF_fix_trigger(pTHX_ SV *trigger, SV *new_id) {
AV* cont = HUF_get_trigger_content(aTHX_ trigger);
HV* field_tab = (HV*) *av_fetch(cont, 1, 0);
@@ -318,7 +318,7 @@ HUF_fix_trigger(pTHX_ SV *trigger, SV *new_id) {
/* Go over object registry and fix all objects. Also fix the object
* registry.
*/
-void
+static void
HUF_fix_objects(pTHX) {
dMY_CXT;
I32 i, len;
diff --git a/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm b/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm
index f4dadc4..c2c4d4e 100644
--- a/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm
+++ b/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm
@@ -5,7 +5,7 @@ use strict;
use warnings;
use Scalar::Util qw( reftype);
-our $VERSION = '1.17';
+our $VERSION = '1.18';
require Exporter;
our @ISA = qw(Exporter);
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index e31cf04..621893d 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1528,7 +1528,7 @@ struct lconv_offset {
size_t offset;
};
-const struct lconv_offset lconv_strings[] = {
+static const struct lconv_offset lconv_strings[] = {
#ifdef USE_LOCALE_NUMERIC
{"decimal_point", STRUCT_OFFSET(struct lconv, decimal_point)},
{"thousands_sep", STRUCT_OFFSET(struct lconv, thousands_sep)},
@@ -1567,7 +1567,7 @@ const struct lconv_offset lconv_strings[] = {
# define isLC_NUMERIC_STRING(name) (0)
#endif
-const struct lconv_offset lconv_integers[] = {
+static const struct lconv_offset lconv_integers[] = {
#ifdef USE_LOCALE_MONETARY
{"int_frac_digits", STRUCT_OFFSET(struct lconv, int_frac_digits)},
{"frac_digits", STRUCT_OFFSET(struct lconv, frac_digits)},
diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm
index bb563bb..d808207 100644
--- a/ext/POSIX/lib/POSIX.pm
+++ b/ext/POSIX/lib/POSIX.pm
@@ -4,7 +4,7 @@ use warnings;
our ($AUTOLOAD, %SIGRT);
-our $VERSION = '1.58';
+our $VERSION = '1.59';
require XSLoader;
diff --git a/ext/PerlIO-encoding/encoding.pm b/ext/PerlIO-encoding/encoding.pm
index 97f05ec..7bae036 100644
--- a/ext/PerlIO-encoding/encoding.pm
+++ b/ext/PerlIO-encoding/encoding.pm
@@ -1,7 +1,7 @@
package PerlIO::encoding;
use strict;
-our $VERSION = '0.22';
+our $VERSION = '0.23';
our $DEBUG = 0;
$DEBUG and warn __PACKAGE__, " called by ", join(", ", caller), "\n";
diff --git a/ext/PerlIO-encoding/encoding.xs b/ext/PerlIO-encoding/encoding.xs
index 3575d72..3e4645c 100644
--- a/ext/PerlIO-encoding/encoding.xs
+++ b/ext/PerlIO-encoding/encoding.xs
@@ -51,7 +51,7 @@ typedef struct {
static const MGVTBL PerlIOEncode_tag = { 0, 0, 0, 0, 0, 0, 0, 0 };
-SV *
+static SV *
PerlIOEncode_getarg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -87,7 +87,7 @@ PerlIOEncode_getarg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
return sv;
}
-IV
+static IV
PerlIOEncode_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, PerlIO_funcs *tab)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -172,7 +172,7 @@ PerlIOEncode_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, PerlIO_funcs *
return code;
}
-IV
+static IV
PerlIOEncode_popped(pTHX_ PerlIO * f)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -195,7 +195,7 @@ PerlIOEncode_popped(pTHX_ PerlIO * f)
return 0;
}
-STDCHAR *
+static STDCHAR *
PerlIOEncode_get_base(pTHX_ PerlIO * f)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -232,7 +232,7 @@ PerlIOEncode_get_base(pTHX_ PerlIO * f)
return e->base.buf;
}
-IV
+static IV
PerlIOEncode_fill(pTHX_ PerlIO * f)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -414,7 +414,7 @@ PerlIOEncode_fill(pTHX_ PerlIO * f)
return code;
}
-IV
+static IV
PerlIOEncode_flush(pTHX_ PerlIO * f)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -531,7 +531,7 @@ PerlIOEncode_flush(pTHX_ PerlIO * f)
return code;
}
-IV
+static IV
PerlIOEncode_close(pTHX_ PerlIO * f)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -560,7 +560,7 @@ PerlIOEncode_close(pTHX_ PerlIO * f)
return code;
}
-Off_t
+static Off_t
PerlIOEncode_tell(pTHX_ PerlIO * f)
{
PerlIOBuf *b = PerlIOSelf(f, PerlIOBuf);
@@ -574,7 +574,7 @@ PerlIOEncode_tell(pTHX_ PerlIO * f)
return PerlIO_tell(PerlIONext(f));
}
-PerlIO *
+static PerlIO *
PerlIOEncode_dup(pTHX_ PerlIO * f, PerlIO * o,
CLONE_PARAMS * params, int flags)
{
@@ -591,7 +591,7 @@ PerlIOEncode_dup(pTHX_ PerlIO * f, PerlIO * o,
return f;
}
-SSize_t
+static SSize_t
PerlIOEncode_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -623,7 +623,7 @@ PerlIOEncode_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
}
}
-PERLIO_FUNCS_DECL(PerlIO_encode) = {
+static PERLIO_FUNCS_DECL(PerlIO_encode) = {
sizeof(PerlIO_funcs),
"encoding",
sizeof(PerlIOEncode),
diff --git a/ext/PerlIO-mmap/mmap.pm b/ext/PerlIO-mmap/mmap.pm
index 845f2d1..939b94f 100644
--- a/ext/PerlIO-mmap/mmap.pm
+++ b/ext/PerlIO-mmap/mmap.pm
@@ -1,7 +1,7 @@
package PerlIO::mmap;
use strict;
use warnings;
-our $VERSION = '0.014';
+our $VERSION = '0.015';
use XSLoader;
XSLoader::load(__PACKAGE__, __PACKAGE__->VERSION);
diff --git a/ext/PerlIO-mmap/mmap.xs b/ext/PerlIO-mmap/mmap.xs
index e6d592a..ff554e1 100644
--- a/ext/PerlIO-mmap/mmap.xs
+++ b/ext/PerlIO-mmap/mmap.xs
@@ -23,7 +23,7 @@ typedef struct {
STDCHAR *bbuf; /* malloced buffer if map fails */
} PerlIOMmap;
-IV
+static IV
PerlIOMmap_map(pTHX_ PerlIO *f)
{
dVAR;
@@ -88,7 +88,7 @@ PerlIOMmap_map(pTHX_ PerlIO *f)
return code;
}
-IV
+static IV
PerlIOMmap_unmap(pTHX_ PerlIO *f)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -116,7 +116,7 @@ PerlIOMmap_unmap(pTHX_ PerlIO *f)
return code;
}
-STDCHAR *
+static STDCHAR *
PerlIOMmap_get_base(pTHX_ PerlIO *f)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -149,7 +149,7 @@ PerlIOMmap_get_base(pTHX_ PerlIO *f)
return PerlIOBuf_get_base(aTHX_ f);
}
-SSize_t
+static SSize_t
PerlIOMmap_unread(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -180,7 +180,7 @@ PerlIOMmap_unread(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
return PerlIOBuf_unread(aTHX_ f, vbuf, count);
}
-SSize_t
+static SSize_t
PerlIOMmap_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -207,7 +207,7 @@ PerlIOMmap_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
return PerlIOBuf_write(aTHX_ f, vbuf, count);
}
-IV
+static IV
PerlIOMmap_flush(pTHX_ PerlIO *f)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -235,7 +235,7 @@ PerlIOMmap_flush(pTHX_ PerlIO *f)
return code;
}
-IV
+static IV
PerlIOMmap_fill(pTHX_ PerlIO *f)
{
PerlIOBuf * const b = PerlIOSelf(f, PerlIOBuf);
@@ -249,7 +249,7 @@ PerlIOMmap_fill(pTHX_ PerlIO *f)
return code;
}
-IV
+static IV
PerlIOMmap_close(pTHX_ PerlIO *f)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -265,14 +265,14 @@ PerlIOMmap_close(pTHX_ PerlIO *f)
return code;
}
-PerlIO *
+static PerlIO *
PerlIOMmap_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags)
{
return PerlIOBase_dup(aTHX_ f, o, param, flags);
}
-PERLIO_FUNCS_DECL(PerlIO_mmap) = {
+static PERLIO_FUNCS_DECL(PerlIO_mmap) = {
sizeof(PerlIO_funcs),
"mmap",
sizeof(PerlIOMmap),
diff --git a/ext/PerlIO-scalar/scalar.pm b/ext/PerlIO-scalar/scalar.pm
index 5d2049b..4ed4e40 100644
--- a/ext/PerlIO-scalar/scalar.pm
+++ b/ext/PerlIO-scalar/scalar.pm
@@ -1,5 +1,5 @@
package PerlIO::scalar;
-our $VERSION = '0.23';
+our $VERSION = '0.24';
require XSLoader;
XSLoader::load();
1;
diff --git a/ext/PerlIO-scalar/scalar.xs b/ext/PerlIO-scalar/scalar.xs
index 49bbff1..f3dff49 100644
--- a/ext/PerlIO-scalar/scalar.xs
+++ b/ext/PerlIO-scalar/scalar.xs
@@ -15,7 +15,7 @@ typedef struct {
Off_t posn;
} PerlIOScalar;
-IV
+static IV
PerlIOScalar_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg,
PerlIO_funcs * tab)
{
@@ -73,7 +73,7 @@ PerlIOScalar_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg,
return code;
}
-IV
+static IV
PerlIOScalar_popped(pTHX_ PerlIO * f)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -84,7 +84,7 @@ PerlIOScalar_popped(pTHX_ PerlIO * f)
return 0;
}
-IV
+static IV
PerlIOScalar_close(pTHX_ PerlIO * f)
{
IV code = PerlIOBase_close(aTHX_ f);
@@ -92,14 +92,14 @@ PerlIOScalar_close(pTHX_ PerlIO * f)
return code;
}
-IV
+static IV
PerlIOScalar_fileno(pTHX_ PerlIO * f)
{
PERL_UNUSED_ARG(f);
return -1;
}
-IV
+static IV
PerlIOScalar_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -133,7 +133,7 @@ PerlIOScalar_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
return 0;
}
-Off_t
+static Off_t
PerlIOScalar_tell(pTHX_ PerlIO * f)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -141,7 +141,7 @@ PerlIOScalar_tell(pTHX_ PerlIO * f)
}
-SSize_t
+static SSize_t
PerlIOScalar_read(pTHX_ PerlIO *f, void *vbuf, Size_t count)
{
if (!f)
@@ -187,7 +187,7 @@ PerlIOScalar_read(pTHX_ PerlIO *f, void *vbuf, Size_t count)
}
}
-SSize_t
+static SSize_t
PerlIOScalar_write(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANWRITE) {
@@ -250,21 +250,21 @@ PerlIOScalar_write(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
return 0;
}
-IV
+static IV
PerlIOScalar_fill(pTHX_ PerlIO * f)
{
PERL_UNUSED_ARG(f);
return -1;
}
-IV
+static IV
PerlIOScalar_flush(pTHX_ PerlIO * f)
{
PERL_UNUSED_ARG(f);
return 0;
}
-STDCHAR *
+static STDCHAR *
PerlIOScalar_get_base(pTHX_ PerlIO * f)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -275,7 +275,7 @@ PerlIOScalar_get_base(pTHX_ PerlIO * f)
return (STDCHAR *) NULL;
}
-STDCHAR *
+static STDCHAR *
PerlIOScalar_get_ptr(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -285,7 +285,7 @@ PerlIOScalar_get_ptr(pTHX_ PerlIO * f)
return (STDCHAR *) NULL;
}
-SSize_t
+static SSize_t
PerlIOScalar_get_cnt(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -300,7 +300,7 @@ PerlIOScalar_get_cnt(pTHX_ PerlIO * f)
return 0;
}
-Size_t
+static Size_t
PerlIOScalar_bufsiz(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -311,7 +311,7 @@ PerlIOScalar_bufsiz(pTHX_ PerlIO * f)
return 0;
}
-void
+static void
PerlIOScalar_set_ptrcnt(pTHX_ PerlIO * f, STDCHAR * ptr, SSize_t cnt)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -321,7 +321,7 @@ PerlIOScalar_set_ptrcnt(pTHX_ PerlIO * f, STDCHAR * ptr, SSize_t cnt)
s->posn = len - cnt;
}
-PerlIO *
+static PerlIO *
PerlIOScalar_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers, IV n,
const char *mode, int fd, int imode, int perm,
PerlIO * f, int narg, SV ** args)
@@ -342,7 +342,7 @@ PerlIOScalar_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers, IV n,
return NULL;
}
-SV *
+static SV *
PerlIOScalar_arg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -359,7 +359,7 @@ PerlIOScalar_arg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
return newRV_noinc(var);
}
-PerlIO *
+static PerlIO *
PerlIOScalar_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param,
int flags)
{
@@ -386,7 +386,7 @@ PerlIOScalar_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param,
return f;
}
-PERLIO_FUNCS_DECL(PerlIO_scalar) = {
+static PERLIO_FUNCS_DECL(PerlIO_scalar) = {
sizeof(PerlIO_funcs),
"scalar",
sizeof(PerlIOScalar),
diff --git a/ext/PerlIO-via/via.pm b/ext/PerlIO-via/via.pm
index a10f7ee..e477dcc 100644
--- a/ext/PerlIO-via/via.pm
+++ b/ext/PerlIO-via/via.pm
@@ -1,5 +1,5 @@
package PerlIO::via;
-our $VERSION = '0.15';
+our $VERSION = '0.16';
require XSLoader;
XSLoader::load();
1;
diff --git a/ext/PerlIO-via/via.xs b/ext/PerlIO-via/via.xs
index d7a037b..8a7f1fc 100644
--- a/ext/PerlIO-via/via.xs
+++ b/ext/PerlIO-via/via.xs
@@ -40,7 +40,7 @@ typedef struct
#define MYMethod(x) #x,&s->x
-CV *
+static CV *
PerlIOVia_fetchmethod(pTHX_ PerlIOVia * s, const char *method, CV ** save)
{
GV *gv = gv_fetchmeth(s->stash, method, strlen(method), 0);
@@ -63,7 +63,7 @@ PerlIOVia_fetchmethod(pTHX_ PerlIOVia * s, const char *method, CV ** save)
* Returns scalar returned by method (if any) otherwise sv_undef
*/
-SV *
+static SV *
PerlIOVia_method(pTHX_ PerlIO * f, const char *method, CV ** save, int flags,
...)
{
@@ -126,7 +126,7 @@ PerlIOVia_method(pTHX_ PerlIO * f, const char *method, CV ** save, int flags,
return result;
}
-IV
+static IV
PerlIOVia_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg,
PerlIO_funcs * tab)
{
@@ -209,7 +209,7 @@ push_failed:
return code;
}
-PerlIO *
+static PerlIO *
PerlIOVia_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers,
IV n, const char *mode, int fd, int imode, int perm,
PerlIO * f, int narg, SV ** args)
@@ -304,7 +304,7 @@ PerlIOVia_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers,
return f;
}
-IV
+static IV
PerlIOVia_popped(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -330,7 +330,7 @@ PerlIOVia_popped(pTHX_ PerlIO * f)
return 0;
}
-IV
+static IV
PerlIOVia_close(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -343,7 +343,7 @@ PerlIOVia_close(pTHX_ PerlIO * f)
return code;
}
-IV
+static IV
PerlIOVia_fileno(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -352,7 +352,7 @@ PerlIOVia_fileno(pTHX_ PerlIO * f)
return (result) ? SvIV(result) : PerlIO_fileno(PerlIONext(f));
}
-IV
+static IV
PerlIOVia_binmode(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -365,7 +365,7 @@ PerlIOVia_binmode(pTHX_ PerlIO * f)
return SvIV(result);
}
-IV
+static IV
PerlIOVia_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -385,7 +385,7 @@ PerlIOVia_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
#endif
}
-Off_t
+static Off_t
PerlIOVia_tell(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -396,7 +396,7 @@ PerlIOVia_tell(pTHX_ PerlIO * f)
: (Off_t) - 1;
}
-SSize_t
+static SSize_t
PerlIOVia_unread(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -410,7 +410,7 @@ PerlIOVia_unread(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
}
}
-SSize_t
+static SSize_t
PerlIOVia_read(pTHX_ PerlIO * f, void *vbuf, Size_t count)
{
SSize_t rd = 0;
@@ -435,7 +435,7 @@ PerlIOVia_read(pTHX_ PerlIO * f, void *vbuf, Size_t count)
return rd;
}
-SSize_t
+static SSize_t
PerlIOVia_write(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANWRITE) {
@@ -452,7 +452,7 @@ PerlIOVia_write(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
return 0;
}
-IV
+static IV
PerlIOVia_fill(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -476,7 +476,7 @@ PerlIOVia_fill(pTHX_ PerlIO * f)
return -1;
}
-IV
+static IV
PerlIOVia_flush(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -489,7 +489,7 @@ PerlIOVia_flush(pTHX_ PerlIO * f)
return (result) ? SvIV(result) : 0;
}
-STDCHAR *
+static STDCHAR *
PerlIOVia_get_base(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -501,7 +501,7 @@ PerlIOVia_get_base(pTHX_ PerlIO * f)
return (STDCHAR *) NULL;
}
-STDCHAR *
+static STDCHAR *
PerlIOVia_get_ptr(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -514,7 +514,7 @@ PerlIOVia_get_ptr(pTHX_ PerlIO * f)
return (STDCHAR *) NULL;
}
-SSize_t
+static SSize_t
PerlIOVia_get_cnt(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -526,7 +526,7 @@ PerlIOVia_get_cnt(pTHX_ PerlIO * f)
return 0;
}
-Size_t
+static Size_t
PerlIOVia_bufsiz(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -537,7 +537,7 @@ PerlIOVia_bufsiz(pTHX_ PerlIO * f)
return 0;
}
-void
+static void
PerlIOVia_set_ptrcnt(pTHX_ PerlIO * f, STDCHAR * ptr, SSize_t cnt)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -545,7 +545,7 @@ PerlIOVia_set_ptrcnt(pTHX_ PerlIO * f, STDCHAR * ptr, SSize_t cnt)
s->cnt = cnt;
}
-void
+static void
PerlIOVia_setlinebuf(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -553,7 +553,7 @@ PerlIOVia_setlinebuf(pTHX_ PerlIO * f)
PerlIOBase_setlinebuf(aTHX_ f);
}
-void
+static void
PerlIOVia_clearerr(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -561,7 +561,7 @@ PerlIOVia_clearerr(pTHX_ PerlIO * f)
PerlIOBase_clearerr(aTHX_ f);
}
-IV
+static IV
PerlIOVia_error(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -570,7 +570,7 @@ PerlIOVia_error(pTHX_ PerlIO * f)
return (result) ? SvIV(result) : PerlIOBase_error(aTHX_ f);
}
-IV
+static IV
PerlIOVia_eof(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -579,7 +579,7 @@ PerlIOVia_eof(pTHX_ PerlIO * f)
return (result) ? SvIV(result) : PerlIOBase_eof(aTHX_ f);
}
-SV *
+static SV *
PerlIOVia_getarg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -588,7 +588,7 @@ PerlIOVia_getarg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
return PerlIOVia_method(aTHX_ f, MYMethod(GETARG), G_SCALAR, Nullsv);
}
-PerlIO *
+static PerlIO *
PerlIOVia_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param,
int flags)
{
@@ -602,7 +602,7 @@ PerlIOVia_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param,
-PERLIO_FUNCS_DECL(PerlIO_object) = {
+static PERLIO_FUNCS_DECL(PerlIO_object) = {
sizeof(PerlIO_funcs),
"via",
sizeof(PerlIOVia),
diff --git a/ext/arybase/arybase.pm b/ext/arybase/arybase.pm
index d905e6f..a519a4b 100644
--- a/ext/arybase/arybase.pm
+++ b/ext/arybase/arybase.pm
@@ -1,6 +1,6 @@
package arybase;
-our $VERSION = "0.10";
+our $VERSION = "0.11";
require XSLoader;
XSLoader::load(); # This returns true, which makes require happy.
diff --git a/ext/arybase/arybase.xs b/ext/arybase/arybase.xs
index af8ef7b..4ff6cbd 100644
--- a/ext/arybase/arybase.xs
+++ b/ext/arybase/arybase.xs
@@ -195,7 +195,7 @@ STATIC OP *ab_ck_aassign(pTHX_ OP *o) {
return o;
}
-void
+STATIC void
tie(pTHX_ SV * const sv, SV * const obj, HV *const stash)
{
SV *rv = newSV_type(SVt_RV);
--
1.9.5.msysgit.1
|
From @tonycozOn Thu Oct 22 17:39:36 2015, bulk88 wrote:
@@ -1125,11 +1125,11 @@ sharedsv_array_mg_free(pTHX_ SV *sv, MAGIC *mg) is inconsistent with the ordering of the static vs the return type with your other changes (and with the general order used in the perl source.) Tony |
The RT System itself - Status changed from 'new' to 'open' |
From @bulk88On Sun Oct 25 16:18:44 2015, tonyc wrote:
That was a typo, revised patch attached. -- |
From @bulk880001-XS-staticing-in-ext-and-dist.patchFrom 6a6b11787f7a2b289608bca2644486bec222bd6d Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Sun, 25 Oct 2015 19:57:11 -0400
Subject: [PATCH] XS staticing in ext and dist
None of these symbols are exported on Win32 (listed in Makefile.PL with
EUMM's FUNCLIST), so they shouldn't be exported on Linux. Making them
static saves space in the SOs by removing symbol name strings, and removing
runtime plt/got indirection.
---
dist/threads-shared/lib/threads/shared.pm | 2 +-
dist/threads-shared/shared.xs | 66 +++++++++++-----------
ext/B/B.pm | 2 +-
ext/B/B.xs | 2 +-
ext/Hash-Util-FieldHash/FieldHash.xs | 36 ++++++------
ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm | 2 +-
ext/POSIX/POSIX.xs | 4 +-
ext/POSIX/lib/POSIX.pm | 2 +-
ext/PerlIO-encoding/encoding.pm | 2 +-
ext/PerlIO-encoding/encoding.xs | 22 ++++----
ext/PerlIO-mmap/mmap.pm | 2 +-
ext/PerlIO-mmap/mmap.xs | 20 +++----
ext/PerlIO-scalar/scalar.pm | 2 +-
ext/PerlIO-scalar/scalar.xs | 38 ++++++-------
ext/PerlIO-via/via.pm | 2 +-
ext/PerlIO-via/via.xs | 54 +++++++++---------
ext/arybase/arybase.pm | 2 +-
ext/arybase/arybase.xs | 2 +-
18 files changed, 131 insertions(+), 131 deletions(-)
diff --git a/dist/threads-shared/lib/threads/shared.pm b/dist/threads-shared/lib/threads/shared.pm
index cdb1990..8b0c950 100644
--- a/dist/threads-shared/lib/threads/shared.pm
+++ b/dist/threads-shared/lib/threads/shared.pm
@@ -7,7 +7,7 @@ use warnings;
use Scalar::Util qw(reftype refaddr blessed);
-our $VERSION = '1.48'; # Please update the pod, too.
+our $VERSION = '1.49'; # Please update the pod, too.
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
diff --git a/dist/threads-shared/shared.xs b/dist/threads-shared/shared.xs
index ee52fa1..34e9784 100644
--- a/dist/threads-shared/shared.xs
+++ b/dist/threads-shared/shared.xs
@@ -179,7 +179,7 @@ typedef struct {
static recursive_lock_t PL_sharedsv_lock; /* Mutex protecting the shared sv space */
-void
+static void
recursive_lock_init(pTHX_ recursive_lock_t *lock)
{
Zero(lock,1,recursive_lock_t);
@@ -187,14 +187,14 @@ recursive_lock_init(pTHX_ recursive_lock_t *lock)
COND_INIT(&lock->cond);
}
-void
+static void
recursive_lock_destroy(pTHX_ recursive_lock_t *lock)
{
MUTEX_DESTROY(&lock->mutex);
COND_DESTROY(&lock->cond);
}
-void
+static void
recursive_lock_release(pTHX_ recursive_lock_t *lock)
{
MUTEX_LOCK(&lock->mutex);
@@ -207,7 +207,7 @@ recursive_lock_release(pTHX_ recursive_lock_t *lock)
MUTEX_UNLOCK(&lock->mutex);
}
-void
+static void
recursive_lock_acquire(pTHX_ recursive_lock_t *lock, const char *file, int line)
{
PERL_UNUSED_ARG(file);
@@ -276,7 +276,7 @@ typedef struct {
we free the memory for the above.
*/
-int
+static int
sharedsv_userlock_free(pTHX_ SV *sv, MAGIC *mg)
{
user_lock *ul = (user_lock *) mg->mg_ptr;
@@ -393,7 +393,7 @@ S_get_userlock(pTHX_ SV* ssv, bool create)
/* Given a private side SV tries to find if the SV has a shared backend,
* by looking for the magic.
*/
-SV *
+static SV *
Perl_sharedsv_find(pTHX_ SV *sv)
{
MAGIC *mg;
@@ -429,7 +429,7 @@ Perl_sharedsv_find(pTHX_ SV *sv)
* magics at it.
* Assumes lock is held.
*/
-void
+static void
Perl_sharedsv_associate(pTHX_ SV *sv, SV *ssv)
{
MAGIC *mg = 0;
@@ -548,7 +548,7 @@ S_sharedsv_dec(pTHX_ SV* ssv)
/* Implements Perl-level share() and :shared */
-void
+static void
Perl_sharedsv_share(pTHX_ SV *sv)
{
switch(SvTYPE(sv)) {
@@ -609,7 +609,7 @@ S_abs_2_rel_milli(double abs)
/* Do OS-specific condition timed wait */
-bool
+static bool
Perl_sharedsv_cond_timedwait(perl_cond *cond, perl_mutex *mut, double abs)
{
#if defined(NETWARE) || defined(I_MACH_CTHREADS)
@@ -730,7 +730,7 @@ S_get_RV(pTHX_ SV *sv, SV *sobj) {
/* Get magic for PERL_MAGIC_shared_scalar(n) */
-int
+static int
sharedsv_scalar_mg_get(pTHX_ SV *sv, MAGIC *mg)
{
SV *ssv = (SV *) mg->mg_ptr;
@@ -750,7 +750,7 @@ sharedsv_scalar_mg_get(pTHX_ SV *sv, MAGIC *mg)
* Used by various mg_set()-type functions.
* Assumes lock is held.
*/
-void
+static void
sharedsv_scalar_store(pTHX_ SV *sv, SV *ssv)
{
dTHXc;
@@ -809,7 +809,7 @@ sharedsv_scalar_store(pTHX_ SV *sv, SV *ssv)
/* Set magic for PERL_MAGIC_shared_scalar(n) */
-int
+static int
sharedsv_scalar_mg_set(pTHX_ SV *sv, MAGIC *mg)
{
SV *ssv = (SV*)(mg->mg_ptr);
@@ -828,7 +828,7 @@ sharedsv_scalar_mg_set(pTHX_ SV *sv, MAGIC *mg)
/* Free magic for PERL_MAGIC_shared_scalar(n) */
-int
+static int
sharedsv_scalar_mg_free(pTHX_ SV *sv, MAGIC *mg)
{
PERL_UNUSED_ARG(sv);
@@ -847,7 +847,7 @@ sharedsv_scalar_mg_free(pTHX_ SV *sv, MAGIC *mg)
/*
* Called during cloning of PERL_MAGIC_shared_scalar(n) magic in new thread
*/
-int
+static int
sharedsv_scalar_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
{
PERL_UNUSED_ARG(param);
@@ -859,7 +859,7 @@ sharedsv_scalar_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
/*
* Called during local $shared
*/
-int
+static int
sharedsv_scalar_mg_local(pTHX_ SV* nsv, MAGIC *mg)
{
MAGIC *nmg;
@@ -878,7 +878,7 @@ sharedsv_scalar_mg_local(pTHX_ SV* nsv, MAGIC *mg)
}
#endif
-const MGVTBL sharedsv_scalar_vtbl = {
+static const MGVTBL sharedsv_scalar_vtbl = {
sharedsv_scalar_mg_get, /* get */
sharedsv_scalar_mg_set, /* set */
0, /* len */
@@ -895,7 +895,7 @@ const MGVTBL sharedsv_scalar_vtbl = {
/* Get magic for PERL_MAGIC_tiedelem(p) */
-int
+static int
sharedsv_elem_mg_FETCH(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
@@ -945,7 +945,7 @@ sharedsv_elem_mg_FETCH(pTHX_ SV *sv, MAGIC *mg)
/* Set magic for PERL_MAGIC_tiedelem(p) */
-int
+static int
sharedsv_elem_mg_STORE(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
@@ -988,7 +988,7 @@ sharedsv_elem_mg_STORE(pTHX_ SV *sv, MAGIC *mg)
/* Clear magic for PERL_MAGIC_tiedelem(p) */
-int
+static int
sharedsv_elem_mg_DELETE(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
@@ -1030,7 +1030,7 @@ sharedsv_elem_mg_DELETE(pTHX_ SV *sv, MAGIC *mg)
/* Called during cloning of PERL_MAGIC_tiedelem(p) magic in new
* thread */
-int
+static int
sharedsv_elem_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
{
PERL_UNUSED_ARG(param);
@@ -1039,7 +1039,7 @@ sharedsv_elem_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
return (0);
}
-const MGVTBL sharedsv_elem_vtbl = {
+static const MGVTBL sharedsv_elem_vtbl = {
sharedsv_elem_mg_FETCH, /* get */
sharedsv_elem_mg_STORE, /* set */
0, /* len */
@@ -1056,7 +1056,7 @@ const MGVTBL sharedsv_elem_vtbl = {
/* Len magic for PERL_MAGIC_tied(P) */
-U32
+static U32
sharedsv_array_mg_FETCHSIZE(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
@@ -1076,7 +1076,7 @@ sharedsv_array_mg_FETCHSIZE(pTHX_ SV *sv, MAGIC *mg)
/* Clear magic for PERL_MAGIC_tied(P) */
-int
+static int
sharedsv_array_mg_CLEAR(pTHX_ SV *sv, MAGIC *mg)
{
dTHXc;
@@ -1110,7 +1110,7 @@ sharedsv_array_mg_CLEAR(pTHX_ SV *sv, MAGIC *mg)
/* Free magic for PERL_MAGIC_tied(P) */
-int
+static int
sharedsv_array_mg_free(pTHX_ SV *sv, MAGIC *mg)
{
PERL_UNUSED_ARG(sv);
@@ -1124,11 +1124,11 @@ sharedsv_array_mg_free(pTHX_ SV *sv, MAGIC *mg)
* the array -
*/
#if PERL_VERSION >= 11
-int
+static int
sharedsv_array_mg_copy(pTHX_ SV *sv, MAGIC* mg,
SV *nsv, const char *name, I32 namlen)
#else
-int
+static int
sharedsv_array_mg_copy(pTHX_ SV *sv, MAGIC* mg,
SV *nsv, const char *name, int namlen)
#endif
@@ -1143,7 +1143,7 @@ sharedsv_array_mg_copy(pTHX_ SV *sv, MAGIC* mg,
/* Called during cloning of PERL_MAGIC_tied(P) magic in new thread */
-int
+static int
sharedsv_array_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
{
PERL_UNUSED_ARG(param);
@@ -1152,7 +1152,7 @@ sharedsv_array_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
return (0);
}
-const MGVTBL sharedsv_array_vtbl = {
+static const MGVTBL sharedsv_array_vtbl = {
0, /* get */
0, /* set */
sharedsv_array_mg_FETCHSIZE,/* len */
@@ -1168,7 +1168,7 @@ const MGVTBL sharedsv_array_vtbl = {
/* Recursively unlocks a shared sv. */
-void
+static void
Perl_sharedsv_unlock(pTHX_ SV *ssv)
{
user_lock *ul = S_get_userlock(aTHX_ ssv, 0);
@@ -1180,7 +1180,7 @@ Perl_sharedsv_unlock(pTHX_ SV *ssv)
/* Recursive locks on a sharedsv.
* Locks are dynamically scoped at the level of the first lock.
*/
-void
+static void
Perl_sharedsv_lock(pTHX_ SV *ssv)
{
user_lock *ul;
@@ -1192,7 +1192,7 @@ Perl_sharedsv_lock(pTHX_ SV *ssv)
/* Handles calls from lock() builtin via PL_lockhook */
-void
+static void
Perl_sharedsv_locksv(pTHX_ SV *sv)
{
SV *ssv;
@@ -1211,7 +1211,7 @@ Perl_sharedsv_locksv(pTHX_ SV *sv)
* or if destroying last proxy on a shared object
*/
#ifdef PL_destroyhook
-bool
+static bool
Perl_shared_object_destroy(pTHX_ SV *sv)
{
SV *ssv;
@@ -1243,7 +1243,7 @@ S_shared_signal_hook(pTHX) {
/* Saves a space for keeping SVs wider than an interpreter. */
-void
+static void
Perl_sharedsv_init(pTHX)
{
dTHXc;
diff --git a/ext/B/B.pm b/ext/B/B.pm
index 13ab3c9..e6844d4 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -15,7 +15,7 @@ require Exporter;
# walkoptree comes from B.xs
BEGIN {
- $B::VERSION = '1.60';
+ $B::VERSION = '1.61';
@B::EXPORT_OK = ();
# Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
diff --git a/ext/B/B.xs b/ext/B/B.xs
index eb21103..b4b6a40 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -666,7 +666,7 @@ static XSPROTO(intrpvar_sv_common)
/* table that drives most of the B::*OP methods */
-const struct OP_methods {
+static const struct OP_methods {
const char *name;
U8 namelen;
U8 type; /* if op_offset_special, access is handled on a case-by-case basis */
diff --git a/ext/Hash-Util-FieldHash/FieldHash.xs b/ext/Hash-Util-FieldHash/FieldHash.xs
index 327b820..46efec6 100644
--- a/ext/Hash-Util-FieldHash/FieldHash.xs
+++ b/ext/Hash-Util-FieldHash/FieldHash.xs
@@ -19,7 +19,7 @@ typedef struct {
START_MY_CXT
/* Inquire the object registry (a lexical hash) from perl */
-HV *
+static HV *
HUF_get_ob_reg(pTHX) {
dSP;
HV* ob_reg = NULL;
@@ -47,7 +47,7 @@ HUF_get_ob_reg(pTHX) {
#define HUF_CLONE 0
#define HUF_RESET -1
-void
+static void
HUF_global(pTHX_ I32 how) {
if (how == HUF_INIT) {
MY_CXT_INIT;
@@ -66,7 +66,7 @@ HUF_global(pTHX_ I32 how) {
/* definition of id transformation */
#define HUF_OBJ_ID(x) newSVuv(PTR2UV(x))
-SV *
+static SV *
HUF_obj_id(pTHX_ SV *obj) {
SV *item = SvRV(obj);
MAGIC *mg;
@@ -94,7 +94,7 @@ HUF_obj_id(pTHX_ SV *obj) {
}
/* set up uvar magic for any sv */
-void
+static void
HUF_add_uvar_magic(
pTHX_
SV* sv, /* the sv to enchant, visible to get/set */
@@ -111,7 +111,7 @@ HUF_add_uvar_magic(
}
/* Fetch the data container of a trigger */
-AV *
+static AV *
HUF_get_trigger_content(pTHX_ SV *trigger) {
MAGIC* mg;
if (trigger && (mg = mg_find(trigger, PERL_MAGIC_uvar)))
@@ -123,7 +123,7 @@ HUF_get_trigger_content(pTHX_ SV *trigger) {
* the object's entry from the object registry. This function goes in
* the uf_set field of the uvar magic of a trigger.
*/
-I32 HUF_destroy_obj(pTHX_ IV index, SV *trigger) {
+static I32 HUF_destroy_obj(pTHX_ IV index, SV *trigger) {
PERL_UNUSED_ARG(index);
/* Do nothing if the weakref wasn't undef'd. Also don't bother
* during global destruction. (MY_CXT.ob_reg is sometimes funny there) */
@@ -155,7 +155,7 @@ I32 HUF_destroy_obj(pTHX_ IV index, SV *trigger) {
* object may * have to be deleted. The trigger is stored in the
* object registry and is also deleted when the object expires.
*/
-SV *
+static SV *
HUF_new_trigger(pTHX_ SV *obj, SV *ob_id) {
dMY_CXT;
SV* trigger = sv_rvweaken(newRV_inc(SvRV(obj)));
@@ -169,7 +169,7 @@ HUF_new_trigger(pTHX_ SV *obj, SV *ob_id) {
}
/* retrieve a trigger for obj if one exists, return NULL otherwise */
-SV *
+static SV *
HUF_ask_trigger(pTHX_ SV *ob_id) {
dMY_CXT;
HE* ent;
@@ -179,7 +179,7 @@ HUF_ask_trigger(pTHX_ SV *ob_id) {
}
/* get the trigger for an object, creating it if necessary */
-SV *
+static SV *
HUF_get_trigger0(pTHX_ SV *obj, SV *ob_id) {
SV* trigger;
if (!(trigger = HUF_ask_trigger(aTHX_ ob_id)))
@@ -187,7 +187,7 @@ HUF_get_trigger0(pTHX_ SV *obj, SV *ob_id) {
return trigger;
}
-SV *
+static SV *
HUF_get_trigger(pTHX_ SV *obj, SV *ob_id) {
SV* trigger = HUF_ask_trigger(aTHX_ ob_id);
if (!trigger)
@@ -198,7 +198,7 @@ HUF_get_trigger(pTHX_ SV *obj, SV *ob_id) {
/* mark an object (trigger) as having been used with a field
(a clenup-liability)
*/
-void
+static void
HUF_mark_field(pTHX_ SV *trigger, SV *field) {
AV* cont = HUF_get_trigger_content(aTHX_ trigger);
HV* field_tab = (HV*) *av_fetch(cont, 1, 0);
@@ -213,7 +213,7 @@ HUF_mark_field(pTHX_ SV *trigger, SV *field) {
/* The key exchange functions. They communicate with S_hv_magic_uvar_xkey
* in hv.c */
-I32 HUF_watch_key_safe(pTHX_ IV action, SV* field) {
+static I32 HUF_watch_key_safe(pTHX_ IV action, SV* field) {
MAGIC* mg = mg_find(field, PERL_MAGIC_uvar);
SV* keysv;
if (mg && (keysv = mg->mg_obj)) {
@@ -236,7 +236,7 @@ I32 HUF_watch_key_safe(pTHX_ IV action, SV* field) {
return 0;
}
-I32 HUF_watch_key_id(pTHX_ IV action, SV* field) {
+static I32 HUF_watch_key_id(pTHX_ IV action, SV* field) {
MAGIC* mg = mg_find(field, PERL_MAGIC_uvar);
SV* keysv;
PERL_UNUSED_ARG(action);
@@ -249,7 +249,7 @@ I32 HUF_watch_key_id(pTHX_ IV action, SV* field) {
return 0;
}
-int HUF_func_2mode( I32(* val)(pTHX_ IV, SV*)) {
+static int HUF_func_2mode( I32(* val)(pTHX_ IV, SV*)) {
int ans = 0;
if (val == &HUF_watch_key_id)
ans = 1;
@@ -258,7 +258,7 @@ int HUF_func_2mode( I32(* val)(pTHX_ IV, SV*)) {
return(ans);
}
-I32(* HUF_mode_2func( int mode))(pTHX_ IV, SV*) {
+static I32(* HUF_mode_2func( int mode))(pTHX_ IV, SV*) {
I32(* ans)(pTHX_ IV, SV*) = NULL;
switch (mode) {
case 1:
@@ -272,7 +272,7 @@ I32(* HUF_mode_2func( int mode))(pTHX_ IV, SV*) {
}
/* see if something is a field hash */
-int
+static int
HUF_get_status(pTHX_ HV *hash) {
int ans = 0;
if (hash && (SvTYPE(hash) == SVt_PVHV)) {
@@ -291,7 +291,7 @@ HUF_get_status(pTHX_ HV *hash) {
/* Thread support. These routines are called by CLONE (and nothing else) */
/* Fix entries for one object in all field hashes */
-void
+static void
HUF_fix_trigger(pTHX_ SV *trigger, SV *new_id) {
AV* cont = HUF_get_trigger_content(aTHX_ trigger);
HV* field_tab = (HV*) *av_fetch(cont, 1, 0);
@@ -318,7 +318,7 @@ HUF_fix_trigger(pTHX_ SV *trigger, SV *new_id) {
/* Go over object registry and fix all objects. Also fix the object
* registry.
*/
-void
+static void
HUF_fix_objects(pTHX) {
dMY_CXT;
I32 i, len;
diff --git a/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm b/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm
index f4dadc4..c2c4d4e 100644
--- a/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm
+++ b/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm
@@ -5,7 +5,7 @@ use strict;
use warnings;
use Scalar::Util qw( reftype);
-our $VERSION = '1.17';
+our $VERSION = '1.18';
require Exporter;
our @ISA = qw(Exporter);
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index e31cf04..621893d 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1528,7 +1528,7 @@ struct lconv_offset {
size_t offset;
};
-const struct lconv_offset lconv_strings[] = {
+static const struct lconv_offset lconv_strings[] = {
#ifdef USE_LOCALE_NUMERIC
{"decimal_point", STRUCT_OFFSET(struct lconv, decimal_point)},
{"thousands_sep", STRUCT_OFFSET(struct lconv, thousands_sep)},
@@ -1567,7 +1567,7 @@ const struct lconv_offset lconv_strings[] = {
# define isLC_NUMERIC_STRING(name) (0)
#endif
-const struct lconv_offset lconv_integers[] = {
+static const struct lconv_offset lconv_integers[] = {
#ifdef USE_LOCALE_MONETARY
{"int_frac_digits", STRUCT_OFFSET(struct lconv, int_frac_digits)},
{"frac_digits", STRUCT_OFFSET(struct lconv, frac_digits)},
diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm
index bb563bb..d808207 100644
--- a/ext/POSIX/lib/POSIX.pm
+++ b/ext/POSIX/lib/POSIX.pm
@@ -4,7 +4,7 @@ use warnings;
our ($AUTOLOAD, %SIGRT);
-our $VERSION = '1.58';
+our $VERSION = '1.59';
require XSLoader;
diff --git a/ext/PerlIO-encoding/encoding.pm b/ext/PerlIO-encoding/encoding.pm
index 97f05ec..7bae036 100644
--- a/ext/PerlIO-encoding/encoding.pm
+++ b/ext/PerlIO-encoding/encoding.pm
@@ -1,7 +1,7 @@
package PerlIO::encoding;
use strict;
-our $VERSION = '0.22';
+our $VERSION = '0.23';
our $DEBUG = 0;
$DEBUG and warn __PACKAGE__, " called by ", join(", ", caller), "\n";
diff --git a/ext/PerlIO-encoding/encoding.xs b/ext/PerlIO-encoding/encoding.xs
index 3575d72..3e4645c 100644
--- a/ext/PerlIO-encoding/encoding.xs
+++ b/ext/PerlIO-encoding/encoding.xs
@@ -51,7 +51,7 @@ typedef struct {
static const MGVTBL PerlIOEncode_tag = { 0, 0, 0, 0, 0, 0, 0, 0 };
-SV *
+static SV *
PerlIOEncode_getarg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -87,7 +87,7 @@ PerlIOEncode_getarg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
return sv;
}
-IV
+static IV
PerlIOEncode_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, PerlIO_funcs *tab)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -172,7 +172,7 @@ PerlIOEncode_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, PerlIO_funcs *
return code;
}
-IV
+static IV
PerlIOEncode_popped(pTHX_ PerlIO * f)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -195,7 +195,7 @@ PerlIOEncode_popped(pTHX_ PerlIO * f)
return 0;
}
-STDCHAR *
+static STDCHAR *
PerlIOEncode_get_base(pTHX_ PerlIO * f)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -232,7 +232,7 @@ PerlIOEncode_get_base(pTHX_ PerlIO * f)
return e->base.buf;
}
-IV
+static IV
PerlIOEncode_fill(pTHX_ PerlIO * f)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -414,7 +414,7 @@ PerlIOEncode_fill(pTHX_ PerlIO * f)
return code;
}
-IV
+static IV
PerlIOEncode_flush(pTHX_ PerlIO * f)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -531,7 +531,7 @@ PerlIOEncode_flush(pTHX_ PerlIO * f)
return code;
}
-IV
+static IV
PerlIOEncode_close(pTHX_ PerlIO * f)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -560,7 +560,7 @@ PerlIOEncode_close(pTHX_ PerlIO * f)
return code;
}
-Off_t
+static Off_t
PerlIOEncode_tell(pTHX_ PerlIO * f)
{
PerlIOBuf *b = PerlIOSelf(f, PerlIOBuf);
@@ -574,7 +574,7 @@ PerlIOEncode_tell(pTHX_ PerlIO * f)
return PerlIO_tell(PerlIONext(f));
}
-PerlIO *
+static PerlIO *
PerlIOEncode_dup(pTHX_ PerlIO * f, PerlIO * o,
CLONE_PARAMS * params, int flags)
{
@@ -591,7 +591,7 @@ PerlIOEncode_dup(pTHX_ PerlIO * f, PerlIO * o,
return f;
}
-SSize_t
+static SSize_t
PerlIOEncode_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
{
PerlIOEncode *e = PerlIOSelf(f, PerlIOEncode);
@@ -623,7 +623,7 @@ PerlIOEncode_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
}
}
-PERLIO_FUNCS_DECL(PerlIO_encode) = {
+static PERLIO_FUNCS_DECL(PerlIO_encode) = {
sizeof(PerlIO_funcs),
"encoding",
sizeof(PerlIOEncode),
diff --git a/ext/PerlIO-mmap/mmap.pm b/ext/PerlIO-mmap/mmap.pm
index 845f2d1..939b94f 100644
--- a/ext/PerlIO-mmap/mmap.pm
+++ b/ext/PerlIO-mmap/mmap.pm
@@ -1,7 +1,7 @@
package PerlIO::mmap;
use strict;
use warnings;
-our $VERSION = '0.014';
+our $VERSION = '0.015';
use XSLoader;
XSLoader::load(__PACKAGE__, __PACKAGE__->VERSION);
diff --git a/ext/PerlIO-mmap/mmap.xs b/ext/PerlIO-mmap/mmap.xs
index e6d592a..ff554e1 100644
--- a/ext/PerlIO-mmap/mmap.xs
+++ b/ext/PerlIO-mmap/mmap.xs
@@ -23,7 +23,7 @@ typedef struct {
STDCHAR *bbuf; /* malloced buffer if map fails */
} PerlIOMmap;
-IV
+static IV
PerlIOMmap_map(pTHX_ PerlIO *f)
{
dVAR;
@@ -88,7 +88,7 @@ PerlIOMmap_map(pTHX_ PerlIO *f)
return code;
}
-IV
+static IV
PerlIOMmap_unmap(pTHX_ PerlIO *f)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -116,7 +116,7 @@ PerlIOMmap_unmap(pTHX_ PerlIO *f)
return code;
}
-STDCHAR *
+static STDCHAR *
PerlIOMmap_get_base(pTHX_ PerlIO *f)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -149,7 +149,7 @@ PerlIOMmap_get_base(pTHX_ PerlIO *f)
return PerlIOBuf_get_base(aTHX_ f);
}
-SSize_t
+static SSize_t
PerlIOMmap_unread(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -180,7 +180,7 @@ PerlIOMmap_unread(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
return PerlIOBuf_unread(aTHX_ f, vbuf, count);
}
-SSize_t
+static SSize_t
PerlIOMmap_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -207,7 +207,7 @@ PerlIOMmap_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count)
return PerlIOBuf_write(aTHX_ f, vbuf, count);
}
-IV
+static IV
PerlIOMmap_flush(pTHX_ PerlIO *f)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -235,7 +235,7 @@ PerlIOMmap_flush(pTHX_ PerlIO *f)
return code;
}
-IV
+static IV
PerlIOMmap_fill(pTHX_ PerlIO *f)
{
PerlIOBuf * const b = PerlIOSelf(f, PerlIOBuf);
@@ -249,7 +249,7 @@ PerlIOMmap_fill(pTHX_ PerlIO *f)
return code;
}
-IV
+static IV
PerlIOMmap_close(pTHX_ PerlIO *f)
{
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
@@ -265,14 +265,14 @@ PerlIOMmap_close(pTHX_ PerlIO *f)
return code;
}
-PerlIO *
+static PerlIO *
PerlIOMmap_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags)
{
return PerlIOBase_dup(aTHX_ f, o, param, flags);
}
-PERLIO_FUNCS_DECL(PerlIO_mmap) = {
+static PERLIO_FUNCS_DECL(PerlIO_mmap) = {
sizeof(PerlIO_funcs),
"mmap",
sizeof(PerlIOMmap),
diff --git a/ext/PerlIO-scalar/scalar.pm b/ext/PerlIO-scalar/scalar.pm
index 5d2049b..4ed4e40 100644
--- a/ext/PerlIO-scalar/scalar.pm
+++ b/ext/PerlIO-scalar/scalar.pm
@@ -1,5 +1,5 @@
package PerlIO::scalar;
-our $VERSION = '0.23';
+our $VERSION = '0.24';
require XSLoader;
XSLoader::load();
1;
diff --git a/ext/PerlIO-scalar/scalar.xs b/ext/PerlIO-scalar/scalar.xs
index 49bbff1..f3dff49 100644
--- a/ext/PerlIO-scalar/scalar.xs
+++ b/ext/PerlIO-scalar/scalar.xs
@@ -15,7 +15,7 @@ typedef struct {
Off_t posn;
} PerlIOScalar;
-IV
+static IV
PerlIOScalar_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg,
PerlIO_funcs * tab)
{
@@ -73,7 +73,7 @@ PerlIOScalar_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg,
return code;
}
-IV
+static IV
PerlIOScalar_popped(pTHX_ PerlIO * f)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -84,7 +84,7 @@ PerlIOScalar_popped(pTHX_ PerlIO * f)
return 0;
}
-IV
+static IV
PerlIOScalar_close(pTHX_ PerlIO * f)
{
IV code = PerlIOBase_close(aTHX_ f);
@@ -92,14 +92,14 @@ PerlIOScalar_close(pTHX_ PerlIO * f)
return code;
}
-IV
+static IV
PerlIOScalar_fileno(pTHX_ PerlIO * f)
{
PERL_UNUSED_ARG(f);
return -1;
}
-IV
+static IV
PerlIOScalar_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -133,7 +133,7 @@ PerlIOScalar_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
return 0;
}
-Off_t
+static Off_t
PerlIOScalar_tell(pTHX_ PerlIO * f)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -141,7 +141,7 @@ PerlIOScalar_tell(pTHX_ PerlIO * f)
}
-SSize_t
+static SSize_t
PerlIOScalar_read(pTHX_ PerlIO *f, void *vbuf, Size_t count)
{
if (!f)
@@ -187,7 +187,7 @@ PerlIOScalar_read(pTHX_ PerlIO *f, void *vbuf, Size_t count)
}
}
-SSize_t
+static SSize_t
PerlIOScalar_write(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANWRITE) {
@@ -250,21 +250,21 @@ PerlIOScalar_write(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
return 0;
}
-IV
+static IV
PerlIOScalar_fill(pTHX_ PerlIO * f)
{
PERL_UNUSED_ARG(f);
return -1;
}
-IV
+static IV
PerlIOScalar_flush(pTHX_ PerlIO * f)
{
PERL_UNUSED_ARG(f);
return 0;
}
-STDCHAR *
+static STDCHAR *
PerlIOScalar_get_base(pTHX_ PerlIO * f)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -275,7 +275,7 @@ PerlIOScalar_get_base(pTHX_ PerlIO * f)
return (STDCHAR *) NULL;
}
-STDCHAR *
+static STDCHAR *
PerlIOScalar_get_ptr(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -285,7 +285,7 @@ PerlIOScalar_get_ptr(pTHX_ PerlIO * f)
return (STDCHAR *) NULL;
}
-SSize_t
+static SSize_t
PerlIOScalar_get_cnt(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -300,7 +300,7 @@ PerlIOScalar_get_cnt(pTHX_ PerlIO * f)
return 0;
}
-Size_t
+static Size_t
PerlIOScalar_bufsiz(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -311,7 +311,7 @@ PerlIOScalar_bufsiz(pTHX_ PerlIO * f)
return 0;
}
-void
+static void
PerlIOScalar_set_ptrcnt(pTHX_ PerlIO * f, STDCHAR * ptr, SSize_t cnt)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -321,7 +321,7 @@ PerlIOScalar_set_ptrcnt(pTHX_ PerlIO * f, STDCHAR * ptr, SSize_t cnt)
s->posn = len - cnt;
}
-PerlIO *
+static PerlIO *
PerlIOScalar_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers, IV n,
const char *mode, int fd, int imode, int perm,
PerlIO * f, int narg, SV ** args)
@@ -342,7 +342,7 @@ PerlIOScalar_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers, IV n,
return NULL;
}
-SV *
+static SV *
PerlIOScalar_arg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
{
PerlIOScalar *s = PerlIOSelf(f, PerlIOScalar);
@@ -359,7 +359,7 @@ PerlIOScalar_arg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
return newRV_noinc(var);
}
-PerlIO *
+static PerlIO *
PerlIOScalar_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param,
int flags)
{
@@ -386,7 +386,7 @@ PerlIOScalar_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param,
return f;
}
-PERLIO_FUNCS_DECL(PerlIO_scalar) = {
+static PERLIO_FUNCS_DECL(PerlIO_scalar) = {
sizeof(PerlIO_funcs),
"scalar",
sizeof(PerlIOScalar),
diff --git a/ext/PerlIO-via/via.pm b/ext/PerlIO-via/via.pm
index a10f7ee..e477dcc 100644
--- a/ext/PerlIO-via/via.pm
+++ b/ext/PerlIO-via/via.pm
@@ -1,5 +1,5 @@
package PerlIO::via;
-our $VERSION = '0.15';
+our $VERSION = '0.16';
require XSLoader;
XSLoader::load();
1;
diff --git a/ext/PerlIO-via/via.xs b/ext/PerlIO-via/via.xs
index d7a037b..8a7f1fc 100644
--- a/ext/PerlIO-via/via.xs
+++ b/ext/PerlIO-via/via.xs
@@ -40,7 +40,7 @@ typedef struct
#define MYMethod(x) #x,&s->x
-CV *
+static CV *
PerlIOVia_fetchmethod(pTHX_ PerlIOVia * s, const char *method, CV ** save)
{
GV *gv = gv_fetchmeth(s->stash, method, strlen(method), 0);
@@ -63,7 +63,7 @@ PerlIOVia_fetchmethod(pTHX_ PerlIOVia * s, const char *method, CV ** save)
* Returns scalar returned by method (if any) otherwise sv_undef
*/
-SV *
+static SV *
PerlIOVia_method(pTHX_ PerlIO * f, const char *method, CV ** save, int flags,
...)
{
@@ -126,7 +126,7 @@ PerlIOVia_method(pTHX_ PerlIO * f, const char *method, CV ** save, int flags,
return result;
}
-IV
+static IV
PerlIOVia_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg,
PerlIO_funcs * tab)
{
@@ -209,7 +209,7 @@ push_failed:
return code;
}
-PerlIO *
+static PerlIO *
PerlIOVia_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers,
IV n, const char *mode, int fd, int imode, int perm,
PerlIO * f, int narg, SV ** args)
@@ -304,7 +304,7 @@ PerlIOVia_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers,
return f;
}
-IV
+static IV
PerlIOVia_popped(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -330,7 +330,7 @@ PerlIOVia_popped(pTHX_ PerlIO * f)
return 0;
}
-IV
+static IV
PerlIOVia_close(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -343,7 +343,7 @@ PerlIOVia_close(pTHX_ PerlIO * f)
return code;
}
-IV
+static IV
PerlIOVia_fileno(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -352,7 +352,7 @@ PerlIOVia_fileno(pTHX_ PerlIO * f)
return (result) ? SvIV(result) : PerlIO_fileno(PerlIONext(f));
}
-IV
+static IV
PerlIOVia_binmode(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -365,7 +365,7 @@ PerlIOVia_binmode(pTHX_ PerlIO * f)
return SvIV(result);
}
-IV
+static IV
PerlIOVia_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -385,7 +385,7 @@ PerlIOVia_seek(pTHX_ PerlIO * f, Off_t offset, int whence)
#endif
}
-Off_t
+static Off_t
PerlIOVia_tell(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -396,7 +396,7 @@ PerlIOVia_tell(pTHX_ PerlIO * f)
: (Off_t) - 1;
}
-SSize_t
+static SSize_t
PerlIOVia_unread(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -410,7 +410,7 @@ PerlIOVia_unread(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
}
}
-SSize_t
+static SSize_t
PerlIOVia_read(pTHX_ PerlIO * f, void *vbuf, Size_t count)
{
SSize_t rd = 0;
@@ -435,7 +435,7 @@ PerlIOVia_read(pTHX_ PerlIO * f, void *vbuf, Size_t count)
return rd;
}
-SSize_t
+static SSize_t
PerlIOVia_write(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANWRITE) {
@@ -452,7 +452,7 @@ PerlIOVia_write(pTHX_ PerlIO * f, const void *vbuf, Size_t count)
return 0;
}
-IV
+static IV
PerlIOVia_fill(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -476,7 +476,7 @@ PerlIOVia_fill(pTHX_ PerlIO * f)
return -1;
}
-IV
+static IV
PerlIOVia_flush(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -489,7 +489,7 @@ PerlIOVia_flush(pTHX_ PerlIO * f)
return (result) ? SvIV(result) : 0;
}
-STDCHAR *
+static STDCHAR *
PerlIOVia_get_base(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -501,7 +501,7 @@ PerlIOVia_get_base(pTHX_ PerlIO * f)
return (STDCHAR *) NULL;
}
-STDCHAR *
+static STDCHAR *
PerlIOVia_get_ptr(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -514,7 +514,7 @@ PerlIOVia_get_ptr(pTHX_ PerlIO * f)
return (STDCHAR *) NULL;
}
-SSize_t
+static SSize_t
PerlIOVia_get_cnt(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -526,7 +526,7 @@ PerlIOVia_get_cnt(pTHX_ PerlIO * f)
return 0;
}
-Size_t
+static Size_t
PerlIOVia_bufsiz(pTHX_ PerlIO * f)
{
if (PerlIOBase(f)->flags & PERLIO_F_CANREAD) {
@@ -537,7 +537,7 @@ PerlIOVia_bufsiz(pTHX_ PerlIO * f)
return 0;
}
-void
+static void
PerlIOVia_set_ptrcnt(pTHX_ PerlIO * f, STDCHAR * ptr, SSize_t cnt)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -545,7 +545,7 @@ PerlIOVia_set_ptrcnt(pTHX_ PerlIO * f, STDCHAR * ptr, SSize_t cnt)
s->cnt = cnt;
}
-void
+static void
PerlIOVia_setlinebuf(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -553,7 +553,7 @@ PerlIOVia_setlinebuf(pTHX_ PerlIO * f)
PerlIOBase_setlinebuf(aTHX_ f);
}
-void
+static void
PerlIOVia_clearerr(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -561,7 +561,7 @@ PerlIOVia_clearerr(pTHX_ PerlIO * f)
PerlIOBase_clearerr(aTHX_ f);
}
-IV
+static IV
PerlIOVia_error(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -570,7 +570,7 @@ PerlIOVia_error(pTHX_ PerlIO * f)
return (result) ? SvIV(result) : PerlIOBase_error(aTHX_ f);
}
-IV
+static IV
PerlIOVia_eof(pTHX_ PerlIO * f)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -579,7 +579,7 @@ PerlIOVia_eof(pTHX_ PerlIO * f)
return (result) ? SvIV(result) : PerlIOBase_eof(aTHX_ f);
}
-SV *
+static SV *
PerlIOVia_getarg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
{
PerlIOVia *s = PerlIOSelf(f, PerlIOVia);
@@ -588,7 +588,7 @@ PerlIOVia_getarg(pTHX_ PerlIO * f, CLONE_PARAMS * param, int flags)
return PerlIOVia_method(aTHX_ f, MYMethod(GETARG), G_SCALAR, Nullsv);
}
-PerlIO *
+static PerlIO *
PerlIOVia_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param,
int flags)
{
@@ -602,7 +602,7 @@ PerlIOVia_dup(pTHX_ PerlIO * f, PerlIO * o, CLONE_PARAMS * param,
-PERLIO_FUNCS_DECL(PerlIO_object) = {
+static PERLIO_FUNCS_DECL(PerlIO_object) = {
sizeof(PerlIO_funcs),
"via",
sizeof(PerlIOVia),
diff --git a/ext/arybase/arybase.pm b/ext/arybase/arybase.pm
index d905e6f..a519a4b 100644
--- a/ext/arybase/arybase.pm
+++ b/ext/arybase/arybase.pm
@@ -1,6 +1,6 @@
package arybase;
-our $VERSION = "0.10";
+our $VERSION = "0.11";
require XSLoader;
XSLoader::load(); # This returns true, which makes require happy.
diff --git a/ext/arybase/arybase.xs b/ext/arybase/arybase.xs
index af8ef7b..4ff6cbd 100644
--- a/ext/arybase/arybase.xs
+++ b/ext/arybase/arybase.xs
@@ -195,7 +195,7 @@ STATIC OP *ab_ck_aassign(pTHX_ OP *o) {
return o;
}
-void
+STATIC void
tie(pTHX_ SV * const sv, SV * const obj, HV *const stash)
{
SV *rv = newSV_type(SVt_RV);
--
1.9.5.msysgit.1
|
From @tonycozOn Sun Oct 25 16:59:01 2015, bulk88 wrote:
Thanks, applied as 0b057af. Tony |
@tonycoz - Status changed from 'open' to 'resolved' |
From @tonycoz(Re-opened) WRT to your patch that ended up in 126452. I don't think it's worth it for the small saving involved. Tony |
@tonycoz - Status changed from 'resolved' to 'open' |
From @bulk88On Mon Oct 26 21:46:39 2015, tonyc wrote:
I think it is worth it, on plain C builds, threads-shared will extern/export nothing except its boot xsub with this patch. You save the symbol string name, the double read indirection, the GOT slots, and the symbol table inside dl (elf32_sym is 4 ptrs big), plus dl's hash table entries. I'd guess 64-96 bytes per symbol. On a C++ build, oh well, dont use C++, you cant make const static circular symbol references. -- |
From @bulk88On Wed Oct 28 03:31:30 2015, bulk88 wrote:
Moving patch from wrong ticket to this one. -- |
From @bulk880001-redo-static-after-perl-126452-partly-0b057af7-revert.patchFrom dbad84e50814898acd36a229bace33fda000876c Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Mon, 26 Oct 2015 23:15:43 -0400
Subject: [PATCH] redo static after "[perl #126452] partly 0b057af7 revert for
C++ builds"
Add back static on C only, after it was reverted in commit eeb9a2fc89
C++ does not allow forward declarations (unlike C) needed to create
circular references/dependencies between symbols.
---
dist/threads-shared/shared.xs | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/dist/threads-shared/shared.xs b/dist/threads-shared/shared.xs
index 66dadec..20a13aa 100644
--- a/dist/threads-shared/shared.xs
+++ b/dist/threads-shared/shared.xs
@@ -332,6 +332,7 @@ static const MGVTBL sharedsv_userlock_vtbl = {
the shared thing.
*/
+#ifdef __cplusplus
extern const MGVTBL sharedsv_scalar_vtbl; /* Scalars have this vtable */
extern const MGVTBL sharedsv_array_vtbl; /* Hashes and arrays have this
- like 'tie' */
@@ -340,6 +341,11 @@ extern const MGVTBL sharedsv_elem_vtbl; /* Elements of hashes and arrays ha
The sharedsv_elem_vtbl associates the element with the array/hash and
the sharedsv_scalar_vtbl associates it with the value
*/
+#else
+static const MGVTBL sharedsv_scalar_vtbl;
+static const MGVTBL sharedsv_array_vtbl;
+static const MGVTBL sharedsv_elem_vtbl;
+#endif
/* Get shared aggregate SV pointed to by threads::shared::tie magic object */
@@ -878,6 +884,9 @@ sharedsv_scalar_mg_local(pTHX_ SV* nsv, MAGIC *mg)
}
#endif
+#ifndef __cplusplus
+static
+#endif
const MGVTBL sharedsv_scalar_vtbl = {
sharedsv_scalar_mg_get, /* get */
sharedsv_scalar_mg_set, /* set */
@@ -1039,6 +1048,9 @@ sharedsv_elem_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
return (0);
}
+#ifndef __cplusplus
+static
+#endif
const MGVTBL sharedsv_elem_vtbl = {
sharedsv_elem_mg_FETCH, /* get */
sharedsv_elem_mg_STORE, /* set */
@@ -1152,6 +1164,9 @@ sharedsv_array_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
return (0);
}
+#ifndef __cplusplus
+static
+#endif
const MGVTBL sharedsv_array_vtbl = {
0, /* get */
0, /* set */
--
1.9.5.msysgit.1
|
From @bulk88On Wed Nov 04 22:10:47 2015, bulk88 wrote:
Bump. -- |
From @bulk88On Sat Nov 28 00:24:27 2015, bulk88 wrote:
Bump. -- |
From @tonycozOn Wed Nov 04 22:10:47 2015, bulk88 wrote:
This part: C++ does not allow forward declarations (unlike C) needed to create circular references/dependencies between symbols. is misleading - C++ does allow forward declarations, but not on static const objects. You could make the vtbls static const on C++ too - predeclare the functions and initialize the vtbls at the top of the file. Tony |
Migrated from rt.perl.org#126431 (status was 'open')
Searchable as RT126431$
The text was updated successfully, but these errors were encountered: