PyObject * pymatecorba_get_stub_from_objref(CORBA_Object objref) { CORBA_Environment ev; CORBA_string repo_id = NULL; PyObject *stub = NULL; CORBA_exception_init(&ev); repo_id = MateCORBA_small_get_type_id(objref, &ev); if (ev._major != CORBA_NO_EXCEPTION) goto cleanup; stub = get_iinterface_stub_from_objref(objref, repo_id, &ev); cleanup: if (repo_id) CORBA_free(repo_id); CORBA_exception_free(&ev); return stub; }
static void _running_context_list_objects (gpointer key, gpointer value, gpointer user_data) { CORBA_Object object = (CORBA_Object) value; CORBA_char *type_id; CORBA_Environment ev; CORBA_exception_init (&ev); type_id = MateCORBA_small_get_type_id (object, &ev); if (ev._major != CORBA_NO_EXCEPTION) type_id = CORBA_string_dup ( "<error determining object type id!>"); CORBA_exception_free (&ev); matecomponent_debug_print ("Alive: ", "[%p]: %s", object, type_id); CORBA_free (type_id); }