10 typedef struct mygc mygc
;
12 static void mygc_destructor( gc_object_t
*p_gc
)
18 static PyObject
*gc_test( PyObject
*self
, PyObject
*args
)
20 mygc
*gc
= (mygc
*)malloc( sizeof( mygc
) );
22 vlc_gc_init( gc
, mygc_destructor
, NULL
);
23 ASSERT( gc
->i_gc_refcount
== 0, "Refcount should be 0" );
25 ASSERT( gc
->i_gc_refcount
== 1, "Refcount should be 1" );
27 ASSERT( gc
->i_gc_refcount
== 2, "Refcount should be 2" );
30 ASSERT( gc
->i_gc_refcount
== 1, "Refcount should be 1" );
37 static PyMethodDef native_gc_test_methods
[] = {
38 DEF_METHOD( gc_test
, "Test GC" )
39 { NULL
, NULL
, 0, NULL
}
42 DECLARE_MODULE( native_gc_test
)