This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "const + static vtables in threads::shared"
authorFather Chrysostomos <sprout@cpan.org>
Tue, 6 Jan 2015 05:32:03 +0000 (21:32 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 6 Jan 2015 14:39:32 +0000 (06:39 -0800)
This reverts commit 7105b7e7a5e49caa06b8d7ef71008838ec902227.

dist/threads-shared/lib/threads/shared.pm
dist/threads-shared/shared.xs

index cdb1990..304891c 100644 (file)
@@ -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.47'; # 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.48
+This document describes threads::shared version 1.47
 
 =head1 SYNOPSIS
 
index 11b1c8a..162a3d7 100644 (file)
 /*
  * The shared things need an interpreter to live in ...
  */
-static PerlInterpreter *PL_sharedsv_space;             /* The shared sv space */
+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;
 
-static recursive_lock_t PL_sharedsv_lock;   /* Mutex protecting the shared sv space */
+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);
 }
 
-const static MGVTBL sharedsv_userlock_vtbl = {
+MGVTBL sharedsv_userlock_vtbl = {
     0,                          /* get */
     0,                          /* set */
     0,                          /* len */
@@ -332,10 +332,10 @@ const static MGVTBL sharedsv_userlock_vtbl = {
    the shared thing.
  */
 
-const static MGVTBL sharedsv_scalar_vtbl;    /* Scalars have this vtable */
-const static MGVTBL sharedsv_array_vtbl;     /* Hashes and arrays have this
+extern MGVTBL sharedsv_scalar_vtbl;    /* Scalars have this vtable */
+extern MGVTBL sharedsv_array_vtbl;     /* Hashes and arrays have this
                                             - like 'tie' */
-const static MGVTBL sharedsv_elem_vtbl;      /* Elements of hashes and arrays have
+extern 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
 
-const static MGVTBL sharedsv_scalar_vtbl = {
+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);
 }
 
-const static MGVTBL sharedsv_elem_vtbl = {
+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);
 }
 
-const static MGVTBL sharedsv_array_vtbl = {
+MGVTBL sharedsv_array_vtbl = {
     0,                          /* get */
     0,                          /* set */
     sharedsv_array_mg_FETCHSIZE,/* len */