Update of /cvsroot/monetdb/MonetDB5/src/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15171

Modified Files:
        mal_builder.mx 
Log Message:
Creation of a zero-valued argument is handy.


Index: mal_builder.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_builder.mx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mal_builder.mx      5 May 2007 14:54:16 -0000       1.23
+++ mal_builder.mx      19 Aug 2007 07:34:28 -0000      1.24
@@ -23,6 +23,7 @@
 of programs by compilers. It has grown out of the MonetDB/SQL code generator.
 The strings being passed as arguments are copied in the process.
 
[EMAIL PROTECTED]
 @h
 #ifndef _MAL_BUILDER_
 #define _MAL_BUILDER_
@@ -51,6 +52,7 @@
 mal_export InstrPtr pushBit(MalBlkPtr mb, InstrPtr q, int val);
 mal_export InstrPtr pushNil(MalBlkPtr mb, InstrPtr q, int tpe);
 mal_export InstrPtr pushNilType(MalBlkPtr mb, InstrPtr q, char *tpe);
+mal_export InstrPtr pushZero(MalBlkPtr mb, InstrPtr q, int tpe);
 
 #endif /* _MAL_BUILDER_ */
 
@@ -311,3 +313,17 @@
 
        return pushArgument(mb, q, _t);
 }
+InstrPtr
+pushZero(MalBlkPtr mb, InstrPtr q, int tpe)
+{
+       int _t;
+       ValRecord cst;
+
+       cst.vtype=TYPE_int;
+       cst.val.ival= 0;
+       convertConstant(tpe, &cst);
+       _t = defConstant(mb,tpe,&cst);
+
+       return pushArgument(mb, q, _t);
+}
[EMAIL PROTECTED]


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to