14 typedef struct mygc mygc;
16 static void mygc_destructor( gc_object_t *p_gc )
22 static PyObject *gc_test( PyObject *self, PyObject *args )
24 mygc *gc = (mygc *)malloc( sizeof( mygc ) );
26 vlc_gc_init( gc, mygc_destructor, NULL );
27 ASSERT( gc->i_gc_refcount == 0, "Refcount should be 0" );
29 ASSERT( gc->i_gc_refcount == 1, "Refcount should be 1" );
31 ASSERT( gc->i_gc_refcount == 2, "Refcount should be 2" );
34 ASSERT( gc->i_gc_refcount == 1, "Refcount should be 1" );
41 static PyMethodDef native_gc_test_methods[] = {
42 DEF_METHOD( gc_test, "Test GC" )
43 { NULL, NULL, 0, NULL }
48 DECLARE_MODULE( native_gc_test )