cvs commit: ponie/src/pmc perl5cargo_cult.pmc
[email protected] (Nicholas Clark) 24 Jun 2004 11:01:49 -0000
| Newsgroups | perl.ponie.changes |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 04/06/24 04:01:48
Modified: perl av.c av.h cv.h embed.fnc embed.h hv.c hv.h proto.h
sv.c sv.h
src/pmc perl5cargo_cult.pmc
Log:
IVs and NVs now entirely via the PMC.
And to prove it works, now stored somewhere else, although not somewhere
permanent.
The permanent version needs to get morphing working, and a proper PMC class
hierarchy, so that IVs and NVs are in the main PMC for SVt_IV and SVt_NV,
and in additional data structures for the more complex types.
Revision Changes Path
1.8 +2 -2 ponie/perl/av.c
Index: av.c
===================================================================
RCS file: /cvs/public/ponie/perl/av.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -r1.7 -r1.8
--- av.c 24 Jun 2004 10:04:16 -0000 1.7
+++ av.c 24 Jun 2004 11:01:48 -0000 1.8
@@ -53,8 +53,8 @@
}
IV* Perl_macro_AvOFF (pTHX_ AV *av) {
- XPVAV* data = (XPVAV*) /**/ SvANY(av);
- return &(data->wibble);
+ return Parrot_PMC_get_pointer_intkey(PL_Parrot,MUMBLE(av),
+ Ponie_P_AVOFF);
}
1.6 +0 -2 ponie/perl/av.h
Index: av.h
===================================================================
RCS file: /cvs/public/ponie/perl/av.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -r1.5 -r1.6
--- av.h 24 Jun 2004 10:04:16 -0000 1.5
+++ av.h 24 Jun 2004 11:01:48 -0000 1.6
@@ -12,8 +12,6 @@
char* xav_array; /* pointer to first array element */
SSize_t xav_fill; /* Index of last element present */
SSize_t xav_max; /* max index for which array has space */
- IV wibble; /* ptr is incremented by offset */
- NV wobble; /* numeric value, if any */
MAGIC* xmg_magic; /* magic for scalar array */
HV* xmg_stash; /* class package */
1.4 +0 -2 ponie/perl/cv.h
Index: cv.h
===================================================================
RCS file: /cvs/public/ponie/perl/cv.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- cv.h 24 Jun 2004 10:04:16 -0000 1.3
+++ cv.h 24 Jun 2004 11:01:48 -0000 1.4
@@ -17,8 +17,6 @@
char * xpv_pv; /* pointer to malloced string (for prototype) */
STRLEN xpv_cur; /* length of xp_pv as a C string */
STRLEN xpv_len; /* allocated size */
- IV wibble; /* integer value */
- NV wobble; /* numeric value, if any */
MAGIC* xmg_magic; /* magic for scalar array */
HV* xmg_stash; /* class package */
1.30 +0 -4 ponie/perl/embed.fnc
Index: embed.fnc
===================================================================
RCS file: /cvs/public/ponie/perl/embed.fnc,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -w -r1.29 -r1.30
--- embed.fnc 24 Jun 2004 10:04:16 -0000 1.29
+++ embed.fnc 24 Jun 2004 11:01:48 -0000 1.30
@@ -1268,8 +1268,6 @@
s |void |more_xpvmg
s |void |more_xpvlv
s |void |more_xpvbm
-s |XPVIV* |new_xiv
-s |XPVNV* |new_xnv
s |XPV* |new_xpv
s |XPVIV* |new_xpviv
s |XPVNV* |new_xpvnv
@@ -1282,8 +1280,6 @@
s |XPVLV* |new_xpvlv
s |XPVBM* |new_xpvbm
s |XPVGV* |new_xpvgv
-s |void |del_xiv |XPVIV* p
-s |void |del_xnv |XPVNV* p
s |void |del_xpv |XPV* p
s |void |del_xpviv |XPVIV* p
s |void |del_xpvnv |XPVNV* p
1.20 +0 -24 ponie/perl/embed.h
Index: embed.h
===================================================================
RCS file: /cvs/public/ponie/perl/embed.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -w -r1.19 -r1.20
--- embed.h 24 Jun 2004 10:04:16 -0000 1.19
+++ embed.h 24 Jun 2004 11:01:48 -0000 1.20
@@ -1837,12 +1837,6 @@
#define more_xpvbm S_more_xpvbm
#endif
#ifdef PERL_CORE
-#define new_xiv S_new_xiv
-#endif
-#ifdef PERL_CORE
-#define new_xnv S_new_xnv
-#endif
-#ifdef PERL_CORE
#define new_xpv S_new_xpv
#endif
#ifdef PERL_CORE
@@ -1879,12 +1873,6 @@
#define new_xpvgv S_new_xpvgv
#endif
#ifdef PERL_CORE
-#define del_xiv S_del_xiv
-#endif
-#ifdef PERL_CORE
-#define del_xnv S_del_xnv
-#endif
-#ifdef PERL_CORE
#define del_xpv S_del_xpv
#endif
#ifdef PERL_CORE
@@ -4410,12 +4398,6 @@
#define more_xpvbm() S_more_xpvbm(aTHX)
#endif
#ifdef PERL_CORE
-#define new_xiv() S_new_xiv(aTHX)
-#endif
-#ifdef PERL_CORE
-#define new_xnv() S_new_xnv(aTHX)
-#endif
-#ifdef PERL_CORE
#define new_xpv() S_new_xpv(aTHX)
#endif
#ifdef PERL_CORE
@@ -4452,12 +4434,6 @@
#define new_xpvgv() S_new_xpvgv(aTHX)
#endif
#ifdef PERL_CORE
-#define del_xiv(a) S_del_xiv(aTHX_ a)
-#endif
-#ifdef PERL_CORE
-#define del_xnv(a) S_del_xnv(aTHX_ a)
-#endif
-#ifdef PERL_CORE
#define del_xpv(a) S_del_xpv(aTHX_ a)
#endif
#ifdef PERL_CORE
1.12 +4 -4 ponie/perl/hv.c
Index: hv.c
===================================================================
RCS file: /cvs/public/ponie/perl/hv.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -r1.11 -r1.12
--- hv.c 24 Jun 2004 10:04:16 -0000 1.11
+++ hv.c 24 Jun 2004 11:01:48 -0000 1.12
@@ -65,13 +65,13 @@
}
IV* Perl_macro_HvTOTALKEYS (pTHX_ HV *hv) {
- XPVHV* data = (XPVHV*) /**/ SvANY(hv);
- return &(data->wibble);
+ return Parrot_PMC_get_pointer_intkey(PL_Parrot,MUMBLE(hv),
+ Ponie_P_HVKEYS);
}
NV* Perl_macro_HvPLACEHOLDERS (pTHX_ HV *hv) {
- XPVHV* data = (XPVHV*) /**/ SvANY(hv);
- return &(data->wobble);
+ return Parrot_PMC_get_pointer_intkey(PL_Parrot,MUMBLE(hv),
+ Ponie_P_HVPLACEHOLDERS);
}
IV Perl_macro_HvUSEDKEYS (pTHX_ HV *hv) {
1.8 +0 -2 ponie/perl/hv.h
Index: hv.h
===================================================================
RCS file: /cvs/public/ponie/perl/hv.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -r1.7 -r1.8
--- hv.h 24 Jun 2004 10:04:16 -0000 1.7
+++ hv.h 24 Jun 2004 11:01:48 -0000 1.8
@@ -35,8 +35,6 @@
char * xhv_array; /* pointer to malloced string */
STRLEN xhv_fill; /* how full xhv_array currently is */
STRLEN xhv_max; /* subscript of last element of xhv_array */
- IV wibble; /* how many elements in the array */
- NV wobble; /* numeric value, if any */
MAGIC* xmg_magic; /* magic for scalar array */
HV* xmg_stash; /* class package */
1.30 +0 -4 ponie/perl/proto.h
Index: proto.h
===================================================================
RCS file: /cvs/public/ponie/perl/proto.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -w -r1.29 -r1.30
--- proto.h 24 Jun 2004 10:04:16 -0000 1.29
+++ proto.h 24 Jun 2004 11:01:48 -0000 1.30
@@ -1220,8 +1220,6 @@
STATIC void S_more_xpvmg(pTHX);
STATIC void S_more_xpvlv(pTHX);
STATIC void S_more_xpvbm(pTHX);
-STATIC XPVIV* S_new_xiv(pTHX);
-STATIC XPVNV* S_new_xnv(pTHX);
STATIC XPV* S_new_xpv(pTHX);
STATIC XPVIV* S_new_xpviv(pTHX);
STATIC XPVNV* S_new_xpvnv(pTHX);
@@ -1234,8 +1232,6 @@
STATIC XPVLV* S_new_xpvlv(pTHX);
STATIC XPVBM* S_new_xpvbm(pTHX);
STATIC XPVGV* S_new_xpvgv(pTHX);
-STATIC void S_del_xiv(pTHX_ XPVIV* p);
-STATIC void S_del_xnv(pTHX_ XPVNV* p);
STATIC void S_del_xpv(pTHX_ XPV* p);
STATIC void S_del_xpviv(pTHX_ XPVIV* p);
STATIC void S_del_xpvnv(pTHX_ XPVNV* p);
1.42 +7 -138 ponie/perl/sv.c
Index: sv.c
===================================================================
RCS file: /cvs/public/ponie/perl/sv.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -w -r1.41 -r1.42
--- sv.c 23 Jun 2004 10:54:24 -0000 1.41
+++ sv.c 24 Jun 2004 11:01:48 -0000 1.42
@@ -538,109 +538,6 @@
Perl_warner(aTHX_ packWARN(WARN_UNINITIALIZED), PL_warn_uninit, "", "");
}
-/* grab a new IV body from the free list, allocating more if necessary */
-
-STATIC XPVIV*
-S_new_xiv(pTHX)
-{
- IV* xiv;
- LOCK_SV_MUTEX;
- if (!PL_xiv_root)
- more_xiv();
- xiv = PL_xiv_root;
- /*
- * See comment in more_xiv() -- RAM.
- */
- PL_xiv_root = *(IV**)xiv;
- UNLOCK_SV_MUTEX;
- return (XPVIV*)((char*)xiv - STRUCT_OFFSET(XPVIV, xiv_iv));
-}
-
-/* return an IV body to the free list */
-
-STATIC void
-S_del_xiv(pTHX_ XPVIV *p)
-{
- IV* xiv = (IV*)((char*)(p) + STRUCT_OFFSET(XPVIV, xiv_iv));
- LOCK_SV_MUTEX;
- *(IV**)xiv = PL_xiv_root;
- PL_xiv_root = xiv;
- UNLOCK_SV_MUTEX;
-}
-
-/* allocate another arena's worth of IV bodies */
-
-STATIC void
-S_more_xiv(pTHX)
-{
- register IV* xiv;
- register IV* xivend;
- XPV* ptr;
- New(705, ptr, 1008/sizeof(XPV), XPV);
- ptr->xpv_pv = (char*)PL_xiv_arenaroot; /* linked list of xiv arenas */
- PL_xiv_arenaroot = ptr; /* to keep Purify happy */
-
- xiv = (IV*) ptr;
- xivend = &xiv[1008 / sizeof(IV) - 1];
- xiv += (sizeof(XPV) - 1) / sizeof(IV) + 1; /* fudge by size of XPV */
- PL_xiv_root = xiv;
- while (xiv < xivend) {
- *(IV**)xiv = (IV *)(xiv + 1);
- xiv++;
- }
- *(IV**)xiv = 0;
-}
-
-/* grab a new NV body from the free list, allocating more if necessary */
-
-STATIC XPVNV*
-S_new_xnv(pTHX)
-{
- NV* xnv;
- LOCK_SV_MUTEX;
- if (!PL_xnv_root)
- more_xnv();
- xnv = PL_xnv_root;
- PL_xnv_root = *(NV**)xnv;
- UNLOCK_SV_MUTEX;
- return (XPVNV*)((char*)xnv - STRUCT_OFFSET(XPVNV, xnv_nv));
-}
-
-/* return an NV body to the free list */
-
-STATIC void
-S_del_xnv(pTHX_ XPVNV *p)
-{
- NV* xnv = (NV*)((char*)(p) + STRUCT_OFFSET(XPVNV, xnv_nv));
- LOCK_SV_MUTEX;
- *(NV**)xnv = PL_xnv_root;
- PL_xnv_root = xnv;
- UNLOCK_SV_MUTEX;
-}
-
-/* allocate another arena's worth of NV bodies */
-
-STATIC void
-S_more_xnv(pTHX)
-{
- register NV* xnv;
- register NV* xnvend;
- XPV *ptr;
- New(711, ptr, 1008/sizeof(XPV), XPV);
- ptr->xpv_pv = (char*)PL_xnv_arenaroot;
- PL_xnv_arenaroot = ptr;
-
- xnv = (NV*) ptr;
- xnvend = &xnv[1008 / sizeof(NV) - 1];
- xnv += (sizeof(XPVIV) - 1) / sizeof(NV) + 1; /* fudge by sizeof XPVIV */
- PL_xnv_root = xnv;
- while (xnv < xnvend) {
- *(NV**)xnv = (NV*)(xnv + 1);
- xnv++;
- }
- *(NV**)xnv = 0;
-}
-
/* grab a new struct xpv from the free list, allocating more if necessary */
STATIC XPV*
@@ -1060,12 +957,6 @@
#ifdef PURIFY
-#define new_XIV() my_safemalloc(sizeof(XPVIV))
-#define del_XIV(p) my_safefree(p)
-
-#define new_XNV() my_safemalloc(sizeof(XPVNV))
-#define del_XNV(p) my_safefree(p)
-
#define new_XPV() my_safemalloc(sizeof(XPV))
#define del_XPV(p) my_safefree(p)
@@ -1095,12 +986,6 @@
#else /* !PURIFY */
-#define new_XIV() (void*)new_xiv()
-#define del_XIV(p) del_xiv((XPVIV*) p)
-
-#define new_XNV() (void*)new_xnv()
-#define del_XNV(p) del_xnv((XPVNV*) p)
-
#define new_XPV() (void*)new_xpv()
#define del_XPV(p) del_xpv((XPV *)p)
@@ -1213,29 +1098,17 @@
UV* Perl_macro_SvUVX (pTHX_ SV *sv) {
- if(SvPMC(sv)) {
- XPVUV* data = (XPVUV*) /**/ SvANY(sv);
- return &(data->xuv_uv);
- }
- return &((XPVUV*)SvANY(sv))->xuv_uv;
+ return Parrot_PMC_get_pointer_intkey(PL_Parrot,MUMBLE(sv), Ponie_P_UVX);
}
NV* Perl_macro_SvNVX (pTHX_ SV *sv) {
- if(SvPMC(sv)) {
- XPVNV* data = (XPVNV*) /**/ SvANY(sv);
- return &(data->xnv_nv);
- }
- return &((XPVNV*)SvANY(sv))->xnv_nv;
+ return Parrot_PMC_get_pointer_intkey(PL_Parrot,MUMBLE(sv), Ponie_P_NVX);
}
IV* Perl_macro_SvIVX (pTHX_ SV *sv) {
- if(SvPMC(sv)) {
- XPVIV* data = (XPVIV*) /**/ SvANY(sv);
- return &(data->xiv_iv);
- }
- return &((XPVIV*)SvANY(sv))->xiv_iv;
+ return Parrot_PMC_get_pointer_intkey(PL_Parrot,MUMBLE(sv), Ponie_P_IVX);
}
@@ -1633,7 +1506,7 @@
len = 0;
iv = SvIVX(sv);
nv = (NV)SvIVX(sv);
- del_XIV(SvANY(sv));
+ assert(SvANY(sv) == 0);
SvPMC_off(sv);
magic = 0;
stash = 0;
@@ -1650,7 +1523,7 @@
iv = I_V(nv);
magic = 0;
stash = 0;
- del_XNV(SvANY(sv));
+ assert(SvANY(sv) == 0);
SvPMC_off(sv);
SvANY(sv) = 0;
if (mt < SVt_PVNV)
@@ -1727,12 +1600,12 @@
case SVt_NULL:
Perl_croak(aTHX_ "Can't upgrade to undef");
case SVt_IV:
- SvANY(sv) = new_XIV();
+ SvANY(sv) = 0;
SvPMC_on(sv);
SvIVX(sv) = iv;
break;
case SVt_NV:
- SvANY(sv) = new_XNV();
+ SvANY(sv) = 0;
SvPMC_on(sv);
SvNVX(sv) = nv;
break;
@@ -5920,11 +5793,7 @@
case SVt_NULL:
break;
case SVt_IV:
- del_XIV(SvANY(sv));
- break;
case SVt_NV:
- del_XNV(SvANY(sv));
- break;
case SVt_RV:
assert(SvANY(sv) == 0);
break;
1.22 +18 -22 ponie/perl/sv.h
Index: sv.h
===================================================================
RCS file: /cvs/public/ponie/perl/sv.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -w -r1.21 -r1.22
--- sv.h 22 Jun 2004 16:20:18 -0000 1.21
+++ sv.h 24 Jun 2004 11:01:48 -0000 1.22
@@ -68,42 +68,48 @@
void* sv_any; /* pointer to something */
U32 sv_refcnt; /* how many references to us */
U32 sv_flags; /* what we are */
- bool sv_is_pmc; /* Are we a PMC or not */
+ IV xiv_iv; /* integer value or pv offset */
+ NV xnv_nv; /* numeric value, if any */
};
struct gv {
XPVGV* sv_any; /* pointer to something */
U32 sv_refcnt; /* how many references to us */
U32 sv_flags; /* what we are */
- bool sv_is_pmc; /* Are we a PMC or not */
+ IV xiv_iv; /* integer value or pv offset */
+ NV xnv_nv; /* numeric value, if any */
};
struct cv {
XPVCV* sv_any; /* pointer to something */
U32 sv_refcnt; /* how many references to us */
U32 sv_flags; /* what we are */
- bool sv_is_pmc; /* Are we a PMC or not */
+ IV xiv_iv; /* integer value or pv offset */
+ NV xnv_nv; /* numeric value, if any */
};
struct av {
XPVAV* sv_any; /* pointer to something */
U32 sv_refcnt; /* how many references to us */
U32 sv_flags; /* what we are */
- bool sv_is_pmc; /* Are we a PMC or not */
+ IV xiv_iv; /* integer value or pv offset */
+ NV xnv_nv; /* numeric value, if any */
};
struct hv {
XPVHV* sv_any; /* pointer to something */
U32 sv_refcnt; /* how many references to us */
U32 sv_flags; /* what we are */
- bool sv_is_pmc; /* Are we a PMC or not */
+ IV xiv_iv; /* integer value or pv offset */
+ NV xnv_nv; /* numeric value, if any */
};
struct io {
XPVIO* sv_any; /* pointer to something */
U32 sv_refcnt; /* how many references to us */
U32 sv_flags; /* what we are */
- bool sv_is_pmc; /* Are we a PMC or not */
+ IV xiv_iv; /* integer value or pv offset */
+ NV xnv_nv; /* numeric value, if any */
};
/*
@@ -245,22 +251,18 @@
char * xpv_pv; /* pointer to malloced string */
STRLEN xpv_cur; /* length of xpv_pv as a C string */
STRLEN xpv_len; /* allocated size */
- IV xiv_iv; /* integer value or pv offset */
};
struct xpvuv {
char * xpv_pv; /* pointer to malloced string */
STRLEN xpv_cur; /* length of xpv_pv as a C string */
STRLEN xpv_len; /* allocated size */
- UV xuv_uv; /* unsigned value or pv offset */
};
struct xpvnv {
char * xpv_pv; /* pointer to malloced string */
STRLEN xpv_cur; /* length of xpv_pv as a C string */
STRLEN xpv_len; /* allocated size */
- IV xiv_iv; /* integer value or pv offset */
- NV xnv_nv; /* numeric value, if any */
};
/* These structure must match the beginning of struct xpvhv in hv.h. */
@@ -268,8 +270,6 @@
char * xpv_pv; /* pointer to malloced string */
STRLEN xpv_cur; /* length of xpv_pv as a C string */
STRLEN xpv_len; /* allocated size */
- IV xiv_iv; /* integer value or pv offset */
- NV xnv_nv; /* numeric value, if any */
MAGIC* xmg_magic; /* linked list of magicalness */
HV* xmg_stash; /* class package */
};
@@ -278,8 +278,6 @@
char * xpv_pv; /* pointer to malloced string */
STRLEN xpv_cur; /* length of xpv_pv as a C string */
STRLEN xpv_len; /* allocated size */
- IV xiv_iv; /* integer value or pv offset */
- NV xnv_nv; /* numeric value, if any */
MAGIC* xmg_magic; /* linked list of magicalness */
HV* xmg_stash; /* class package */
@@ -311,8 +309,6 @@
char * xpv_pv; /* pointer to malloced string */
STRLEN xpv_cur; /* length of xpv_pv as a C string */
STRLEN xpv_len; /* allocated size */
- IV xiv_iv; /* integer value or pv offset */
- NV xnv_nv; /* numeric value, if any */
MAGIC* xmg_magic; /* linked list of magicalness */
HV* xmg_stash; /* class package */
@@ -327,8 +323,6 @@
char * xpv_pv; /* pointer to malloced string */
STRLEN xpv_cur; /* length of xpv_pv as a C string */
STRLEN xpv_len; /* allocated size */
- IV xiv_iv; /* integer value or pv offset */
- NV xnv_nv; /* numeric value, if any */
MAGIC* xmg_magic; /* linked list of magicalness */
HV* xmg_stash; /* class package */
@@ -345,8 +339,6 @@
char * xpv_pv; /* pointer to malloced string */
STRLEN xpv_cur; /* length of xpv_pv as a C string */
STRLEN xpv_len; /* allocated size */
- IV xiv_iv; /* integer value or pv offset */
- NV xnv_nv; /* numeric value, if any */
MAGIC* xmg_magic; /* linked list of magicalness */
HV* xmg_stash; /* class package */
@@ -371,8 +363,6 @@
char * xpv_pv; /* pointer to malloced string */
STRLEN xpv_cur; /* length of xpv_pv as a C string */
STRLEN xpv_len; /* allocated size */
- IV xiv_iv; /* integer value or pv offset */
- NV xnv_nv; /* numeric value, if any */
MAGIC* xmg_magic; /* linked list of magicalness */
HV* xmg_stash; /* class package */
@@ -422,6 +412,12 @@
typedef enum {
Ponie_P_ANY, /* SvANY pointer */
Ponie_P_RV, /* SvRV pointer */
+ Ponie_P_IVX, /* SvIVX pointer */
+ Ponie_P_UVX, /* SvIVX pointer */
+ Ponie_P_AVOFF, /* SvIVX pointer */
+ Ponie_P_HVKEYS, /* SvIVX pointer */
+ Ponie_P_NVX, /* SvNVX pointer */
+ Ponie_P_HVPLACEHOLDERS, /* SvNVX pointer */
Ponie_P_MAX
} Ponie_pointers;
1.11 +13 -3 ponie/src/pmc/perl5cargo_cult.pmc
Index: perl5cargo_cult.pmc
===================================================================
RCS file: /cvs/public/ponie/src/pmc/perl5cargo_cult.pmc,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -r1.10 -r1.11
--- perl5cargo_cult.pmc 23 Jun 2004 10:54:25 -0000 1.10
+++ perl5cargo_cult.pmc 24 Jun 2004 11:01:48 -0000 1.11
@@ -1,7 +1,7 @@
/* Perl5QQQ.pmc -*- c -*-
* Copyright: 2001-2004 The Perl Foundation. All Rights Reserved.
* CVS Info
- * $Id: perl5cargo_cult.pmc,v 1.10 2004/06/23 10:54:25 nicholas Exp $
+ * $Id: perl5cargo_cult.pmc,v 1.11 2004/06/24 11:01:48 nicholas Exp $
* Overview:
* These are the vtable functions for the Perl5QQQ base class
* Data Structure and Algorithms:
@@ -44,9 +44,19 @@
case Ponie_P_RV:
return &(PMC_pmc_val(SELF));
/*return &(((struct xrv*)((struct STRUCT_SV *)PMC_struct_val(SELF))->sv_any)->xrv_rv);*/
- /*default:
- Can't easily croak. */
+ case Ponie_P_IVX:
+ case Ponie_P_UVX:
+ case Ponie_P_AVOFF:
+ case Ponie_P_HVKEYS:
+ return &(((struct STRUCT_SV *)PMC_struct_val(SELF))->xiv_iv);
+ case Ponie_P_NVX:
+ case Ponie_P_HVPLACEHOLDERS:
+ return &(((struct STRUCT_SV *)PMC_struct_val(SELF))->xnv_nv);
+ default:
+ /* Can't easily croak. */
/*croak ("Out of range key %d (max is %d)", key, Ponie_P_MAX - 1);*/
+ fprintf (stderr, "Out of range key %d (max is %d)", (int)key,
+ (int)Ponie_P_MAX - 1);
}
return 0;
}