Leopold Toetsch writes:
> Pete Lomax wrote:
> 
> >My question is: What can I do to P4 entries to mark them as available
> >for re-use?
> 
> close:
>     P0=P4[I1]
>     close P0
> # mark slot as free
>     null P5
>     P4[I1]=P5    # set to NULL
>     ret
> 
> you can test the entry by:
> 
>    set P0, P4[I1]
>    isnull P0, is_close
>    #
> is_close:

When writing one of my pet languages, I found a need (or a want) to
replace the contents of a PMC with a different PMC.  To accomplish this,
I wrote an op that memcpied the header of the source into the header of
the destination.  It worked.  (Maybe a simple struct assignment would
work, too)

Is this a safe thing to do?  If so, I think it deserves core ophood.

Luke

> >Regards,
> >Pete
> 
> leo
> 

Reply via email to