use strict;
use warnings;
-our $VERSION = '1.13';
+our $VERSION = '1.14';
my $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
=head1 VERSION
-This document describes threads::shared version 1.13
+This document describes threads::shared version 1.14
=head1 SYNOPSIS
L<http://www.cpanforum.com/dist/threads-shared>
Annotated POD for L<threads::shared>:
-L<http://annocpan.org/~JDHEDDEN/threads-shared-1.13/shared.pm>
+L<http://annocpan.org/~JDHEDDEN/threads-shared-1.14/shared.pm>
Source repository:
L<http://code.google.com/p/threads-shared/>
#include "perl.h"
#include "XSUB.h"
#ifdef HAS_PPPORT_H
+# define NEED_sv_2pv_flags
# define NEED_vnewSVpvf
# define NEED_warner
# include "ppport.h"
PROTOTYPES: ENABLE
void
-_id(SV *ref)
+_id(SV *myref)
PROTOTYPE: \[$@%]
PREINIT:
SV *ssv;
CODE:
- ref = SvRV(ref);
- if (SvROK(ref))
- ref = SvRV(ref);
- ssv = Perl_sharedsv_find(aTHX_ ref);
+ myref = SvRV(myref);
+ if (SvROK(myref))
+ myref = SvRV(myref);
+ ssv = Perl_sharedsv_find(aTHX_ myref);
if (! ssv)
XSRETURN_UNDEF;
ST(0) = sv_2mortal(newSVuv(PTR2UV(ssv)));
void
-_refcnt(SV *ref)
+_refcnt(SV *myref)
PROTOTYPE: \[$@%]
PREINIT:
SV *ssv;
CODE:
- ref = SvRV(ref);
- if (SvROK(ref))
- ref = SvRV(ref);
- ssv = Perl_sharedsv_find(aTHX_ ref);
+ myref = SvRV(myref);
+ if (SvROK(myref))
+ myref = SvRV(myref);
+ ssv = Perl_sharedsv_find(aTHX_ myref);
if (! ssv) {
if (ckWARN(WARN_THREADS)) {
Perl_warner(aTHX_ packWARN(WARN_THREADS),
void
-share(SV *ref)
+share(SV *myref)
PROTOTYPE: \[$@%]
CODE:
- if (! SvROK(ref))
+ if (! SvROK(myref))
Perl_croak(aTHX_ "Argument to share needs to be passed as ref");
- ref = SvRV(ref);
- if (SvROK(ref))
- ref = SvRV(ref);
- Perl_sharedsv_share(aTHX_ ref);
- ST(0) = sv_2mortal(newRV_inc(ref));
+ myref = SvRV(myref);
+ if (SvROK(myref))
+ myref = SvRV(myref);
+ Perl_sharedsv_share(aTHX_ myref);
+ ST(0) = sv_2mortal(newRV_inc(myref));
/* XSRETURN(1); - implied */
void
-cond_signal(SV *ref)
+cond_signal(SV *myref)
PROTOTYPE: \[$@%]
PREINIT:
SV *ssv;
user_lock *ul;
CODE:
- if (! SvROK(ref))
+ if (! SvROK(myref))
Perl_croak(aTHX_ "Argument to cond_signal needs to be passed as ref");
- ref = SvRV(ref);
- if (SvROK(ref))
- ref = SvRV(ref);
- ssv = Perl_sharedsv_find(aTHX_ ref);
+ myref = SvRV(myref);
+ if (SvROK(myref))
+ myref = SvRV(myref);
+ ssv = Perl_sharedsv_find(aTHX_ myref);
if (! ssv)
Perl_croak(aTHX_ "cond_signal can only be used on shared values");
ul = S_get_userlock(aTHX_ ssv, 1);
void
-cond_broadcast(SV *ref)
+cond_broadcast(SV *myref)
PROTOTYPE: \[$@%]
PREINIT:
SV *ssv;
user_lock *ul;
CODE:
- if (! SvROK(ref))
+ if (! SvROK(myref))
Perl_croak(aTHX_ "Argument to cond_broadcast needs to be passed as ref");
- ref = SvRV(ref);
- if (SvROK(ref))
- ref = SvRV(ref);
- ssv = Perl_sharedsv_find(aTHX_ ref);
+ myref = SvRV(myref);
+ if (SvROK(myref))
+ myref = SvRV(myref);
+ ssv = Perl_sharedsv_find(aTHX_ myref);
if (! ssv)
Perl_croak(aTHX_ "cond_broadcast can only be used on shared values");
ul = S_get_userlock(aTHX_ ssv, 1);
void
-bless(SV* ref, ...);
+bless(SV* myref, ...);
PROTOTYPE: $;$
PREINIT:
HV* stash;
}
stash = gv_stashpvn(ptr, len, TRUE);
}
- SvREFCNT_inc_void(ref);
- (void)sv_bless(ref, stash);
- ST(0) = sv_2mortal(ref);
- ssv = Perl_sharedsv_find(aTHX_ ref);
+ SvREFCNT_inc_void(myref);
+ (void)sv_bless(myref, stash);
+ ST(0) = sv_2mortal(myref);
+ ssv = Perl_sharedsv_find(aTHX_ myref);
if (ssv) {
dTHXc;
ENTER_LOCK;