
On Thu, Jul 17, 2008 at 01:47:20PM +0200, Ying Zhang wrote:
On Thu, Jul 17, 2008 at 01:31:51PM +0200, Stefan Manegold wrote:
On Thu, Jul 17, 2008 at 01:27:37PM +0200, Ying Zhang wrote:
Hi Stefan,
You are right (again). A small question:
@= xrpc_bat - xrpc_@1 = BATnew(TYPE_void,ATOMindex("@2"),1024); - assert(xrpc_@1); - BATseqbase(xrpc_@1, 1); - BBPrename(xrpc_@1->batCacheid, "xrpc_@1"); + xrpc_bat = BATnew(TYPE_void,ATOMindex("@2"),1024); + assert(xrpc_bat); + BATseqbase(xrpc_bat, 1); + BBPrename(xrpc_bat->batCacheid, "xrpc_@1"); @c
bat* xrpc_prelude(void) { + BAT *xrpc_bat = NULL; @:xrpc_bat(qids,str)@ @:xrpc_bat(statuses,str)@ @:xrpc_bat(timeouts,lng)@ @@ -886,7 +883,9 @@ @:xrpc_bat(wsbats,bat)@
@:xrpc_bat(trusted,str)@ + xrpc_trusted = xrpc_bat; @:xrpc_bat(admin,str)@ + xrpc_admin = xrpc_bat;
Is there a particular reason to change this macro?
yes: use 1 local variable instead of 8 global variables.
There are only 2 global variables left, and they are created/initialized hier. I didn't see the need to introduce a new (local) var for this. Or do I miss something?
Without the above modification the macro expects/used variables xrpc_@1, i.e., with two of them defined globally (xrpc_trusted & xrpc_admin) the remaining 6 (xrpc_{qids,statuses,timeouts,locks,wsbats,user} would need to be define locally in xrpc_prelude() --- not a problem as such, but instead of defining these 6 varibles or single-use, I decided to define only a single one (xrpc_bat) and re-use it ... Stefan
Jennie
Stefan
Jennie
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |