Update of /cvsroot/pure-data/externals/clr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8231/clr
Modified Files: clr.cpp makefile Log Message: small cleanups
Index: makefile =================================================================== RCS file: /cvsroot/pure-data/externals/clr/makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** makefile 9 Mar 2006 17:27:37 -0000 1.3 --- makefile 10 Mar 2006 01:01:19 -0000 1.4 *************** *** 3,12 **** clean: ; rm -f *.dll *.o
- cygwin: clr.dll
.SUFFIXES: .dll
- # where are the PD header files? # leave it blank if it is a system directory (like /usr/local/include), --- 3,10 ---- *************** *** 16,32 **** MONOPATH=/cygdrive/c/programme/prog/mono
! CFLAGS = -DPD -O2 -mno-cygwin ! ! PDINC= -I$(PDPATH)/src PDLIB= $(PDPATH)/bin/pd.dll ! ! MONOINC = -I$(MONOPATH)/include -I$(MONOPATH)/include/glib-2.0 -I$(MONOPATH)/lib/glib-2.0/include ! MONOLIB = -L$(MONOPATH)/lib -lmono.dll -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv ! ! .cpp.dll: ! g++ $(CFLAGS) $(PDINC) $(MONOINC) -o $*.o -c $*.cpp ! g++ -export_dynamic -shared -mno-cygwin $(PDLIB) $(MONOLIB) -o $*.dll $*.o -lm ! # ld -export_dynamic $(MONOLIB) -o $*.dll $*.o -lm pd.dll ! # strip --strip-unneeded $*.pd_linux ! # rm $*.o --- 14,28 ---- MONOPATH=/cygdrive/c/programme/prog/mono
+ CFLAGS = -DPD -mno-cygwin + CFLAGS += -O2 + #CFLAGS += -g
! PDINC= -I$(PDPATH)/src PDLIB= $(PDPATH)/bin/pd.dll ! ! MONOINC = -I$(MONOPATH)/include -I$(MONOPATH)/include/glib-2.0 -I$(MONOPATH)/lib/glib-2.0/include ! MONOLIB = -L$(MONOPATH)/lib -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv -lmono ! ! .cpp.dll: ! g++ $(CFLAGS) $(PDINC) $(MONOINC) -o $*.o -c $*.cpp ! g++ -export_dynamic -shared -mno-cygwin $(PDLIB) -o $*.dll $*.o $(MONOLIB) -lm
Index: clr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/clr/clr.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** clr.cpp 9 Mar 2006 19:06:53 -0000 1.15 --- clr.cpp 10 Mar 2006 01:01:19 -0000 1.16 *************** *** 30,39 **** #include <list>
#define CORELIB "PureData" #define DLLEXT "dll"
- // cached mono data
static MonoDomain *monodomain; static MonoClass *clr_symbol,*clr_pointer,*clr_atom,*clr_atomlist,*clr_external; --- 30,45 ---- #include <list>
+ + // main class library #define CORELIB "PureData" #define DLLEXT "dll"
+ // symbol for inter-object messages + #define SYM_OBJECT "clr-object" + + static t_symbol *sym_object;
+ // cached mono data static MonoDomain *monodomain; static MonoClass *clr_symbol,*clr_pointer,*clr_atom,*clr_atomlist,*clr_external; *************** *** 42,47 **** static MonoProperty *clr_prop_method;
- static t_symbol *sym_object; -
struct AtomList --- 48,51 ---- *************** *** 56,62 **** struct ObjectAtom { - enum { size = 3,bitshift = 22 }; - // 64-bit safe... t_atom msg[size];
--- 60,66 ---- struct ObjectAtom { // 64-bit safe... + enum { bitshift = 22,size = sizeof(void*)*8/bitshift+1 }; + t_atom msg[size];
*************** *** 120,124 **** --- 124,130 ---- { methodinfo = mono_property_get_value(clr_prop_method,method,NULL,NULL); + assert(methodinfo); virtmethod = mono_object_get_virtual_method(methodinfo,clr_meth_invoke); + assert(virtmethod); kind = k; } *************** *** 1022,1026 ****
// symbol for Mono object handling ! sym_object = gensym("clr-object");
// install loader hook --- 1028,1032 ----
// symbol for Mono object handling ! sym_object = gensym(SYM_OBJECT);
// install loader hook