cvs commit: ponie/perl embed.fnc proto.h sv.c

[email protected] (Arthur Bergman) 2 Mar 2004 13:00:21 -0000
Newsgroups perl.ponie.changes
Message-ID <[email protected]>
cvsuser     04/03/02 05:00:21

  Modified:    perl     embed.fnc proto.h sv.c
  Log:
  Unregister PMCs when you are done with them
  
  Revision  Changes    Path
  1.12      +2 -2      ponie/perl/embed.fnc
  
  Index: embed.fnc
  ===================================================================
  RCS file: /cvs/public/ponie/perl/embed.fnc,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -w -r1.11 -r1.12
  --- embed.fnc	2 Mar 2004 11:31:50 -0000	1.11
  +++ embed.fnc	2 Mar 2004 13:00:21 -0000	1.12
  @@ -1243,8 +1243,8 @@
   s	|void	|del_xpviv	|XPVIV* p
   s	|void	|del_xpvnv	|XPVNV* p
   s	|void	|del_xpvcv	|XPVCV* p
  -s	|void	|del_xpvav	|XPVAV* p
  -s	|void	|del_xpvhv	|XPVHV* p
  +s	|void	|del_xpvav	|Parrot_PMC p
  +s	|void	|del_xpvhv	|Parrot_PMC p
   s	|void	|del_xpvmg	|XPVMG* p
   s	|void	|del_xpvlv	|Parrot_PMC p
   s	|void	|del_xpvbm	|XPVBM* p
  
  
  
  1.12      +2 -2      ponie/perl/proto.h
  
  Index: proto.h
  ===================================================================
  RCS file: /cvs/public/ponie/perl/proto.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -w -r1.11 -r1.12
  --- proto.h	2 Mar 2004 11:31:50 -0000	1.11
  +++ proto.h	2 Mar 2004 13:00:21 -0000	1.12
  @@ -1194,8 +1194,8 @@
   STATIC void	S_del_xpviv(pTHX_ XPVIV* p);
   STATIC void	S_del_xpvnv(pTHX_ XPVNV* p);
   STATIC void	S_del_xpvcv(pTHX_ XPVCV* p);
  -STATIC void	S_del_xpvav(pTHX_ XPVAV* p);
  -STATIC void	S_del_xpvhv(pTHX_ XPVHV* p);
  +STATIC void	S_del_xpvav(pTHX_ Parrot_PMC p);
  +STATIC void	S_del_xpvhv(pTHX_ Parrot_PMC p);
   STATIC void	S_del_xpvmg(pTHX_ XPVMG* p);
   STATIC void	S_del_xpvlv(pTHX_ Parrot_PMC p);
   STATIC void	S_del_xpvbm(pTHX_ XPVBM* p);
  
  
  
  1.15      +5 -12     ponie/perl/sv.c
  
  Index: sv.c
  ===================================================================
  RCS file: /cvs/public/ponie/perl/sv.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -w -r1.14 -r1.15
  --- sv.c	2 Mar 2004 11:31:50 -0000	1.14
  +++ sv.c	2 Mar 2004 13:00:21 -0000	1.15
  @@ -942,9 +942,9 @@
   /* return a struct xpvav to the free list */
   
   STATIC void
  -S_del_xpvav(pTHX_ XPVAV *p)
  +S_del_xpvav(pTHX_ Parrot_PMC av)
   {
  -
  +  Parrot_unregister_pmc(PL_Parrot, av);
   }
   
   /* allocate another arena's worth of struct xpvav */
  @@ -997,13 +997,9 @@
   /* return a struct xpvhv to the free list */
   
   STATIC void
  -S_del_xpvhv(pTHX_ XPVHV *p)
  +S_del_xpvhv(pTHX_ Parrot_PMC p)
   {
  -  /* LOCK_SV_MUTEX;
  -    p->xhv_array = (char*)PL_xpvhv_root;
  -    PL_xpvhv_root = p;
  -    UNLOCK_SV_MUTEX;
  -  */
  +  Parrot_unregister_pmc(PL_Parrot, p);
   }
   
   /* allocate another arena's worth of struct xpvhv */
  @@ -1117,10 +1113,7 @@
   STATIC void
   S_del_xpvlv(pTHX_ Parrot_PMC lval)
   {
  -  /*
  -    PerlIO_printf(Perl_debug_log,
  -    "Dropped PMC %p\n", lval);
  -  */
  +  Parrot_unregister_pmc(PL_Parrot, lval);
   }
   
   /* allocate another arena's worth of struct xpvlv */