summaryrefslogtreecommitdiff
path: root/dist/threads-shared
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2015-01-20 18:08:03 -0500
committerFather Chrysostomos <sprout@cpan.org>2015-01-24 17:26:36 -0800
commit47b62f63607d1af76ce720886fdaffbf5aab33c5 (patch)
tree6ef45808b7b8ab2dc773ed8aa868afb30e0d75ec /dist/threads-shared
parent2f465e08eb39981706429873d24e3bcc18015bfb (diff)
downloadperl-47b62f63607d1af76ce720886fdaffbf5aab33c5.tar.gz
attempt again to const vtables in threads-shared
Followup to commit a8c717cfeb and commit 7105b7e7a5 and perl #123549 . This should be C++ compatible even though it leaves some symbols non-static.
Diffstat (limited to 'dist/threads-shared')
-rw-r--r--dist/threads-shared/lib/threads/shared.pm4
-rw-r--r--dist/threads-shared/shared.xs18
2 files changed, 11 insertions, 11 deletions
diff --git a/dist/threads-shared/lib/threads/shared.pm b/dist/threads-shared/lib/threads/shared.pm
index 304891cf31..cdb1990268 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.47'; # Please update the pod, too.
+our $VERSION = '1.48'; # Please update the pod, too.
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -195,7 +195,7 @@ threads::shared - Perl extension for sharing data structures between threads
=head1 VERSION
-This document describes threads::shared version 1.47
+This document describes threads::shared version 1.48
=head1 SYNOPSIS
diff --git a/dist/threads-shared/shared.xs b/dist/threads-shared/shared.xs
index 162a3d7028..ee52fa1c20 100644
--- a/dist/threads-shared/shared.xs
+++ b/dist/threads-shared/shared.xs
@@ -136,7 +136,7 @@
/*
* The shared things need an interpreter to live in ...
*/
-PerlInterpreter *PL_sharedsv_space; /* The shared sv space */
+static PerlInterpreter *PL_sharedsv_space; /* The shared sv space */
/* To access shared space we fake aTHX in this scope and thread's context */
/* Bug #24255: We include ENTER+SAVETMPS/FREETMPS+LEAVE with
@@ -177,7 +177,7 @@ typedef struct {
#endif
} recursive_lock_t;
-recursive_lock_t PL_sharedsv_lock; /* Mutex protecting the shared sv space */
+static recursive_lock_t PL_sharedsv_lock; /* Mutex protecting the shared sv space */
void
recursive_lock_init(pTHX_ recursive_lock_t *lock)
@@ -291,7 +291,7 @@ sharedsv_userlock_free(pTHX_ SV *sv, MAGIC *mg)
return (0);
}
-MGVTBL sharedsv_userlock_vtbl = {
+static const MGVTBL sharedsv_userlock_vtbl = {
0, /* get */
0, /* set */
0, /* len */
@@ -332,10 +332,10 @@ MGVTBL sharedsv_userlock_vtbl = {
the shared thing.
*/
-extern MGVTBL sharedsv_scalar_vtbl; /* Scalars have this vtable */
-extern MGVTBL sharedsv_array_vtbl; /* Hashes and arrays have this
+extern const MGVTBL sharedsv_scalar_vtbl; /* Scalars have this vtable */
+extern const MGVTBL sharedsv_array_vtbl; /* Hashes and arrays have this
- like 'tie' */
-extern MGVTBL sharedsv_elem_vtbl; /* Elements of hashes and arrays have
+extern const MGVTBL sharedsv_elem_vtbl; /* Elements of hashes and arrays have
this _AS WELL AS_ the scalar magic:
The sharedsv_elem_vtbl associates the element with the array/hash and
the sharedsv_scalar_vtbl associates it with the value
@@ -878,7 +878,7 @@ sharedsv_scalar_mg_local(pTHX_ SV* nsv, MAGIC *mg)
}
#endif
-MGVTBL sharedsv_scalar_vtbl = {
+const MGVTBL sharedsv_scalar_vtbl = {
sharedsv_scalar_mg_get, /* get */
sharedsv_scalar_mg_set, /* set */
0, /* len */
@@ -1039,7 +1039,7 @@ sharedsv_elem_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
return (0);
}
-MGVTBL sharedsv_elem_vtbl = {
+const MGVTBL sharedsv_elem_vtbl = {
sharedsv_elem_mg_FETCH, /* get */
sharedsv_elem_mg_STORE, /* set */
0, /* len */
@@ -1152,7 +1152,7 @@ sharedsv_array_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param)
return (0);
}
-MGVTBL sharedsv_array_vtbl = {
+const MGVTBL sharedsv_array_vtbl = {
0, /* get */
0, /* set */
sharedsv_array_mg_FETCHSIZE,/* len */