4 #include <vlc_common.h>
12 typedef struct mygc mygc;
14 static void mygc_destructor( gc_object_t *p_gc )
20 static PyObject *gc_test( PyObject *self, PyObject *args )
22 mygc *gc = (mygc *)malloc( sizeof( mygc ) );
24 vlc_gc_init( gc, mygc_destructor );
25 gc->i_gc_refcount = 0;
28 ASSERT( gc->i_gc_refcount == 1, "Refcount should be 1" );
30 ASSERT( gc->i_gc_refcount == 2, "Refcount should be 2" );
33 ASSERT( gc->i_gc_refcount == 1, "Refcount should be 1" );
40 static PyMethodDef native_gc_test_methods[] = {
41 DEF_METHOD( gc_test, "Test GC" )
42 { NULL, NULL, 0, NULL }
45 DECLARE_MODULE( native_gc_test )