[Gridflow-cvs] [svn] commit: r4917 - in /trunk/src: gridflow.hxx source_filter.rb

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Sun Jan 24 14:29:47 EST 2010


Author: matju
Date: Sun Jan 24 14:29:46 2010
New Revision: 4917

Log:
add \def hook macros : DEF_IN and DEF_OUT

Modified:
    trunk/src/gridflow.hxx
    trunk/src/source_filter.rb

Modified: trunk/src/gridflow.hxx
==============================================================================
--- trunk/src/gridflow.hxx (original)
+++ trunk/src/gridflow.hxx Sun Jan 24 14:29:46 2010
@@ -55,6 +55,10 @@
 #define gensym(s) gensym(const_cast<char *>(s))
 #define sys_vgui(FMT,ARGS...) sys_vgui(const_cast<char *>(FMT),ARGS)
 #define sys_gui(s) sys_gui(const_cast<char *>(s))
+
+//#define DEF_IN post("> self=%08x %s",long(self),methodspec);
+#define DEF_IN
+#define DEF_OUT
 
 #ifndef DESIREDATA
 #define A_LIST    t_atomtype(13) /* (t_binbuf *) */

Modified: trunk/src/source_filter.rb
==============================================================================
--- trunk/src/source_filter.rb (original)
+++ trunk/src/source_filter.rb Sun Jan 24 14:29:46 2010
@@ -169,6 +169,7 @@
 	if in_class_block then Out.print "static void " else Out.print "void #{classname}::" end
 	Out.print "#{m.selector}_wrap(#{classname} *self, VA) {"
 	Out.print "static const char *methodspec = \"#{qlass.name}::#{m.selector}(#{unparse_arglist m.arglist,false})\";"
+	Out.print "DEF_IN;"
 	Out.print "#{m.rettype} foo;" if m.rettype!="void"
 	Out.print "if (argc<#{m.minargs}"
 	Out.print "||argc>#{m.maxargs}" if m.maxargs!=-1
@@ -182,14 +183,14 @@
 			Out.print ",convert(argv[#{i}],(#{arg.type}*)0)"
 		end
 	}
-	Out.print ");} #{m.rettype} "
+	Out.print "); DEF_OUT;} #{m.rettype} "
 	Out.print "#{classname}::" unless in_class_block
 	Out.print m.selector+"(VA"
 	#puts "m=#{m} n=#{n}"
 	Out.print ","+unparse_arglist(n.arglist,false) if m.arglist.length>0
 	Out.print ")#{term} "
 	qlass.methods[m.selector].done=true
-	Out.print "/*in_class_block=#{in_class_block.inspect}*/"
+	#Out.print "/*in_class_block=#{in_class_block.inspect}*/"
 end
 
 def handle_constructor(line)



More information about the Gridflow-cvs mailing list