return ''
if($path =~ m:/(RCS|CVS|SCCS)/: ||
$path =~ m:[~%]$: ||
- $path =~ m:(\.(orig|rej)|~)$:
+ $path =~ m:\.(orig|rej)$:
);
$path;
NUL character). Calls C<sv_grow> to perform the expansion if necessary.
Returns a pointer to the character buffer.
-=for apidoc Am|void|SvLOCK|SV* sv
-Aquires an internal mutex for a SV. Used to make sure multiple threads
-don't stomp on the guts of an SV at the same time
-
-=for apidoc Am|void|SvUNLOCK|SV* sv
-Release the internal mutex for an SV.
-
=cut
*/
SvSetSV_nosteal_and(dst,src,SvSETMAGIC(dst))
#ifdef DEBUGGING
-
-#define SvLOCK(sv) MUTEX_LOCK(&PL_sv_lock_mutex)
-#define SvUNLOCK(sv) MUTEX_UNLOCK(&PL_sv_lock_mutex)
#define SvPEEK(sv) sv_peek(sv)
#else
#define SvPEEK(sv) ""
# define UNLOCK_CRED_MUTEX MUTEX_UNLOCK(&PL_cred_mutex)
# define LOCK_FDPID_MUTEX MUTEX_LOCK(&PL_fdpid_mutex)
# define UNLOCK_FDPID_MUTEX MUTEX_UNLOCK(&PL_fdpid_mutex)
+# define LOCK_SV_LOCK_MUTEX MUTEX_LOCK(&PL_sv_lock_mutex)
+# define UNLOCK_SV_LOCK_MUTEX MUTEX_UNLOCK(&PL_sv_lock_mutex)
/* Values and macros for thr->flags */
#define THRf_STATE_MASK 7
# define UNLOCK_FDPID_MUTEX
#endif
+#ifndef LOCK_SV_LOCK_MUTEX
+# define LOCK_SV_LOCK_MUTEX
+#endif
+
+#ifndef UNLOCK_SV_LOCK_MUTEX
+# define UNLOCK_SV_LOCK_MUTEX
+#endif
+
/* THR, SET_THR, and dTHR are there for compatibility with old versions */
#ifndef THR
# define THR PERL_GET_THX
MAGIC *mg;
SV *sv = osv;
- SvLOCK(osv);
+ LOCK_SV_LOCK_MUTEX;
if (SvROK(sv)) {
sv = SvRV(sv);
- SvUNLOCK(osv);
- SvLOCK(sv);
}
mg = condpair_magic(sv);
MUTEX_UNLOCK(MgMUTEXP(mg));
SAVEDESTRUCTOR_X(Perl_unlock_condpair, sv);
}
- SvUNLOCK(sv);
+ UNLOCK_SV_LOCK_MUTEX;
return sv;
}