Update of /cvsroot/pure-data/externals/clr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18908/clr
Modified Files: clr.cpp Log Message: some small additions, like ability to set pd class type
Index: clr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/clr/clr.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** clr.cpp 8 Mar 2006 16:48:28 -0000 1.9 --- clr.cpp 8 Mar 2006 17:37:25 -0000 1.10 *************** *** 382,385 **** --- 382,386 ---- assert(obj); assert(obj->outlets); + assert(n >= 0 && n < obj->outlets->size()); outlet_bang((*obj->outlets)[n]); } *************** *** 389,392 **** --- 390,394 ---- assert(obj); assert(obj->outlets); + assert(n >= 0 && n < obj->outlets->size()); outlet_float((*obj->outlets)[n],f); } *************** *** 396,399 **** --- 398,402 ---- assert(obj); assert(obj->outlets); + assert(n >= 0 && n < obj->outlets->size()); outlet_symbol((*obj->outlets)[n],s); } *************** *** 403,406 **** --- 406,410 ---- assert(obj); assert(obj->outlets); + assert(n >= 0 && n < obj->outlets->size()); outlet_pointer((*obj->outlets)[n],p); } *************** *** 410,413 **** --- 414,418 ---- assert(obj); assert(obj->outlets); + assert(n >= 0 && n < obj->outlets->size()); t_outlet *out = (*obj->outlets)[n]; switch(l.a_type) { *************** *** 424,427 **** --- 429,433 ---- assert(obj); assert(obj->outlets); + assert(n >= 0 && n < obj->outlets->size()); outlet_anything((*obj->outlets)[n],s,l.argc,l.argv); } *************** *** 431,434 **** --- 437,441 ---- assert(obj); assert(obj->outlets); + assert(n >= 0 && n < obj->outlets->size()); // assert(mono_object_get_class(&l->obj) == clr_atom); outlet_anything((*obj->outlets)[n],s,mono_array_length(l),mono_array_addr(l,t_atom,0)); *************** *** 556,560 **** // make new class (with classname) classsym = gensym(classname); ! clr_class->pd_class = class_new(classsym,(t_newmethod)clr_new,(t_method)clr_free, sizeof(t_clr), CLASS_DEFAULT, A_GIMME, 0);
clr_class->obj_field = mono_class_get_field_from_name(clr_class->mono_class,"ptr"); --- 563,568 ---- // make new class (with classname) classsym = gensym(classname); ! clr_class->pd_class = NULL; ! int flags = CLASS_DEFAULT;
clr_class->obj_field = mono_class_get_field_from_name(clr_class->mono_class,"ptr"); *************** *** 583,587 **** gpointer args = obj; MonoObject *exc; ! mono_runtime_invoke(method,NULL,&args,&exc);
// unset current class --- 591,599 ---- gpointer args = obj; MonoObject *exc; ! MonoObject *ret = mono_runtime_invoke(method,NULL,&args,&exc); ! if(ret) { ! // \TODO check return type ! flags = *(int *)mono_object_unbox(ret); ! }
// unset current class *************** *** 599,602 **** --- 611,617 ---- clr_class->mono_ctor = mono_method_desc_search_in_class(clr_desc_ctor,clr_class->mono_class);
+ // make pd class + clr_class->pd_class = class_new(classsym,(t_newmethod)clr_new,(t_method)clr_free, sizeof(t_clr), flags, A_GIMME, A_NULL); + // find && register methods if(clr_class->method_bang)