You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by jo...@apache.org on 2003/05/31 06:52:39 UTC
cvs commit: httpd-apreq-2/glue/perl/xsbuilder apreq_xs_postperl.h
joes 2003/05/30 21:52:39
Modified: glue/perl/xsbuilder apreq_xs_postperl.h
Log:
Fix typemap magic (to support request_rec inheritance).
Revision Changes Path
1.2 +3 -7 httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h
Index: apreq_xs_postperl.h
===================================================================
RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apreq_xs_postperl.h 30 May 2003 19:15:22 -0000 1.1
+++ apreq_xs_postperl.h 31 May 2003 04:52:39 -0000 1.2
@@ -68,7 +68,8 @@
SvIVX(sv) = (IV)t; \
SvIOK_on(sv); \
SvPOK_on(sv); \
- return sv; \
+ sv_magic(sv, Nullsv, PERL_MAGIC_ext, (char *)t->env, 0); \
+ return newRV_noinc(sv); \
}
@@ -95,13 +96,8 @@
SvPVX(sv) = t->v.data; \
SvCUR_set(sv, t->v.size); \
\
- sv_magicext(sv, NULL, PERL_MAGIC_tiedscalar, \
+ sv_magicext(sv, Nullsv, PERL_MAGIC_tiedscalar, \
(MGVTBL *)&apreq_xs_##type##_magic, (char *)t, 0); \
- \
- /* disable get/set magic (only use "free" magic) */ \
- SvSMAGICAL_off(sv); \
- SvGMAGICAL_off(sv); \
- SvRMAGICAL_on(sv); \
\
/* initialize sv as an object, so "tied" will return object ref */ \
SvSTASH(sv) = gv_stashpv(class, TRUE); \