use magic stashing to manage C instances
authorYuval Kogman <nothingmuch@woobling.org>
Sun, 19 Apr 2009 19:30:53 +0000 (21:30 +0200)
committerYuval Kogman <nothingmuch@woobling.org>
Sun, 19 Apr 2009 19:59:27 +0000 (21:59 +0200)
commitd67688d9ab3000febe11bc475e3741a13beffb2e
tree931adf899e0cacf43521672f9267b16a082199c2
parent89d28f9f90bbf697a356dd8f37c62f8fadd43178
use magic stashing to manage C instances

the meta instance now refers to the SV

mop_{instance,attr}_get_c_instance() functions added, which lazily build
the C instance as necessary and stash it in the magic

this implements indirect reference counting for the C structures such
that they can refer to each other safely (by referring to the Perl side
MOP objects)
cmop/mop_attr.c
cmop/mop_instance.c
include/mop_instance.h
xs/Instance.xs