projects
/
perl-fuse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c3366e0
)
Changes to improve compatibility with Perl 5.8.
author
Derrik Pates
<demon@now.ai>
Sat, 23 Jul 2011 02:09:18 +0000
(20:09 -0600)
committer
Derrik Pates
<demon@now.ai>
Sat, 23 Jul 2011 02:09:18 +0000
(20:09 -0600)
Fuse.xs
patch
|
blob
|
history
diff --git
a/Fuse.xs
b/Fuse.xs
index
f84aa49
..
9e2504e
100755
(executable)
--- a/
Fuse.xs
+++ b/
Fuse.xs
@@
-16,6
+16,14
@@
#ifdef USE_ITHREADS
# ifdef I_PTHREAD
# define FUSE_USE_ITHREADS
#ifdef USE_ITHREADS
# ifdef I_PTHREAD
# define FUSE_USE_ITHREADS
+# if (PERL_VERSION < 10)
+# define tTHX PerlInterpreter*
+# define STR_WITH_LEN(s) ("" s ""), (sizeof(s)-1)
+# define hv_fetchs(hv,key,lval) Perl_hv_fetch(aTHX_ hv, STR_WITH_LEN(key), lval)
+# define dMY_CXT_INTERP(interp) \
+ SV *my_cxt_sv = *hv_fetchs(interp->Imodglobal, MY_CXT_KEY, TRUE); \
+ my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*, SvUV(my_cxt_sv))
+# endif
# else
# warning "Sorry, I don't know how to handle ithreads on this architecture. Building non-threaded version"
# endif
# else
# warning "Sorry, I don't know how to handle ithreads on this architecture. Building non-threaded version"
# endif
@@
-54,6
+62,9
@@
tTHX master_interp = NULL;
#define CLONE_INTERP(parent) S_clone_interp(parent)
tTHX S_clone_interp(tTHX parent) {
#define CLONE_INTERP(parent) S_clone_interp(parent)
tTHX S_clone_interp(tTHX parent) {
+#if (PERL_VERSION < 10)
+ tTHX my_perl = parent;
+#endif
dMY_CXT_INTERP(parent);
if(MY_CXT.threaded) {
MUTEX_LOCK(&MY_CXT.mutex);
dMY_CXT_INTERP(parent);
if(MY_CXT.threaded) {
MUTEX_LOCK(&MY_CXT.mutex);