cvs commit: ponie/perl sv.c sv.h

[email protected] (Nicholas Clark) 22 Jun 2004 16:20:18 -0000
Newsgroups perl.ponie.changes
Message-ID <[email protected]>
cvsuser     04/06/22 09:20:18

  Modified:    perl     sv.c sv.h
  Log:
  Get the RV's location via a get_pointer_intkey call on the PMC.
  
  Revision  Changes    Path
  1.40      +1 -5      ponie/perl/sv.c
  
  Index: sv.c
  ===================================================================
  RCS file: /cvs/public/ponie/perl/sv.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -w -r1.39 -r1.40
  --- sv.c	21 Jun 2004 21:00:26 -0000	1.39
  +++ sv.c	22 Jun 2004 16:20:18 -0000	1.40
  @@ -1269,11 +1269,7 @@
   
   
   SV** Perl_macro_SvRV (pTHX_ SV *sv) {
  -  if(SvPMC(sv)) {
  -    XRV* data = (XRV*) /**/ SvANY(sv);
  -    return &(data->xrv_rv);
  -  }
  -  return &((XRV*)SvANY(sv))->xrv_rv;
  +  return Parrot_PMC_get_pointer_intkey(PL_Parrot,MUMBLE(sv), Ponie_P_RV);
   }
   
   
  
  
  
  1.21      +9 -0      ponie/perl/sv.h
  
  Index: sv.h
  ===================================================================
  RCS file: /cvs/public/ponie/perl/sv.h,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -w -r1.20 -r1.21
  --- sv.h	17 Jun 2004 14:51:37 -0000	1.20
  +++ sv.h	22 Jun 2004 16:20:18 -0000	1.21
  @@ -416,6 +416,15 @@
   #define IOf_NOLINE	32	/* slurped a pseudo-line from empty file */
   #define IOf_FAKE_DIRP	64	/* xio_dirp is fake (source filters kludge) */
   
  +
  +/* All the things get_pointer_keyed_int can return.  */
  +
  +typedef enum {
  +  Ponie_P_ANY,	/* SvANY pointer  */
  +  Ponie_P_RV,	/* SvRV pointer	  */
  +  Ponie_P_MAX
  +} Ponie_pointers;
  +
   /* The following macros define implementation-independent predicates on SVs. */
   
   /*