[prev in list] [next in list] [prev in thread] [next in thread] 

List:       monetdb-checkins
Subject:    MonetDB: Oct2014 - Remove return types from atom methods.
From:       Sjoerd Mullender <commits () monetdb ! org>
Date:       2015-04-29 12:41:44
Message-ID: hg.d6e6de2de49a.1430311304.6315528441665844383 () monetdb2 ! cwi-incubator ! nl
[Download RAW message or body]

Changeset: d6e6de2de49a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d6e6de2de49a
Modified Files:
	geom/monetdb5/geom.mal
	monetdb5/modules/atoms/color.mal
	monetdb5/modules/atoms/inet.mal
	monetdb5/modules/atoms/json.mal
	monetdb5/modules/atoms/mtime.mal
	monetdb5/modules/atoms/url.mal
	monetdb5/modules/atoms/uuid.mal
	monetdb5/modules/atoms/xml.mal
Branch: Oct2014
Log Message:

Remove return types from atom methods.
They are implemented completely differently than other MAL commands,
and some of the return types don't make sense.
This makes checking in clients/malcheck easier.


diffs (216 lines):

diff --git a/geom/monetdb5/geom.mal b/geom/monetdb5/geom.mal
--- a/geom/monetdb5/geom.mal
+++ b/geom/monetdb5/geom.mal
@@ -20,30 +20,30 @@ module geom;
 # @' overwrite lng needed for fixed size! Sizes are fixed in geom.prelude
 atom mbr:lng;
 
-command tostr() :str		address mbrTOSTR;
-command fromstr() :mbr		address mbrFROMSTR;
-command hash() :int		address mbrHASH;
-command null() :int		address mbrNULL;
-command cmp() :int		address mbrCOMP;
+command tostr()			address mbrTOSTR;
+command fromstr()		address mbrFROMSTR;
+command hash()			address mbrHASH;
+command null()			address mbrNULL;
+command cmp()			address mbrCOMP;
 command read()			address mbrREAD;
 command write()			address mbrWRITE;
 
-command mbr(v:str) :mbr address mbrFromString;
+command mbr(v:str) :mbr		address mbrFromString;
 
 atom wkb;
 
-command tostr() :str		address wkbTOSTR;
-command fromstr() :wkb		address wkbFROMSTR;
-command hash() :int		address wkbHASH;
-command null() :int		address wkbNULL;
-command cmp() :int		address wkbCOMP;
+command tostr()			address wkbTOSTR;
+command fromstr()		address wkbFROMSTR;
+command hash()			address wkbHASH;
+command null()			address wkbNULL;
+command cmp()			address wkbCOMP;
 command read()			address wkbREAD;
 command write()			address wkbWRITE;
 
-command put() :int		address wkbPUT;
-command del() :int		address wkbDEL;
-command length() :int		address wkbLENGTH;
-command heap() :int		address wkbHEAP;
+command put()			address wkbPUT;
+command del()			address wkbDEL;
+command length()		address wkbLENGTH;
+command heap()			address wkbHEAP;
 
 command wkb{unsafe}(v:str) :wkb address wkbFromString;
 command FromText{unsafe}(w:str, type:int) :wkb	address wkbFromText;
diff --git a/monetdb5/modules/atoms/color.mal b/monetdb5/modules/atoms/color.mal
--- a/monetdb5/modules/atoms/color.mal
+++ b/monetdb5/modules/atoms/color.mal
@@ -19,8 +19,8 @@ module color;
 
 atom color:int;
 
-command tostr():str address color_tostr;
-command fromstr():color address color_fromstr;
+command tostr() address color_tostr;
+command fromstr() address color_fromstr;
 
 command str(s:color):str
 address CLRstr
diff --git a/monetdb5/modules/atoms/inet.mal b/monetdb5/modules/atoms/inet.mal
--- a/monetdb5/modules/atoms/inet.mal
+++ b/monetdb5/modules/atoms/inet.mal
@@ -17,9 +17,9 @@
 
 atom inet:lng;
 
-command null() :inet
+command null()
 address INETnull;
-command cmp() :int
+command cmp()
 address INETcompare;
 command fromstr()
 address INETfromString
diff --git a/monetdb5/modules/atoms/json.mal b/monetdb5/modules/atoms/json.mal
--- a/monetdb5/modules/atoms/json.mal
+++ b/monetdb5/modules/atoms/json.mal
@@ -17,11 +17,11 @@
 
 atom json:str;
 
-command fromstr():json
+command fromstr()
 address JSONfromString
 comment "Validate a string to be JSON compliant. A NOOP if valid json, NULL otherwise.";
 
-command tostr():str
+command tostr()
 address JSONtoString
 comment "Convert JSON to its string equivalent. Dealing with escape characters";
 
diff --git a/monetdb5/modules/atoms/mtime.mal b/monetdb5/modules/atoms/mtime.mal
--- a/monetdb5/modules/atoms/mtime.mal
+++ b/monetdb5/modules/atoms/mtime.mal
@@ -51,9 +51,9 @@ command date(s:date):date
 address MTIMEdate_date
 comment "Noop routine.";
 
-command fromstr() :date
+command fromstr()
 address date_fromstr;
-command tostr() :str
+command tostr()
 address date_tostr;
 
 
@@ -132,9 +132,9 @@ comment "Maximum test for date value";
 #        SEP = '.' or ':'
 # @end verbatim
 atom daytime :int;
-command fromstr():daytime
+command fromstr()
 address daytime_tz_fromstr;
-command tostr():str
+command tostr()
 address daytime_tostr;
 
 
@@ -221,10 +221,10 @@ comment "Maximum test for daytime value"
 # timezone. The default local timezone is just GMT+00, but it can be set
 # arbitrarily.
 atom timestamp :lng;
-command fromstr():timestamp
+command fromstr()
 address timestamp_fromstr;
 
-command tostr():str
+command tostr()
 address timestamp_tostr;
 
 command unix_epoch{unsafe}():timestamp
@@ -347,9 +347,9 @@ comment "Maximum test for timestamp valu
 # Other values of the rule parameters on creating a timezone will produce a
 # nil-timezone.
 atom timezone :lng;
-command fromstr():timezone
+command fromstr()
 address tzone_fromstr;
-command tostr():str
+command tostr()
 address tzone_tostr;
 command str(z:timezone):str
 address MTIMEtzone_tostr;
@@ -360,9 +360,9 @@ address MTIMEtimestamp
 comment "Utility function to create a timestamp from a number of seconds since the Unix epoch";
 
 atom zrule :int;
-command fromstr():zrule
+command fromstr()
 address rule_fromstr;
-command tostr():str
+command tostr()
 address rule_tostr;
 command define(m:int,d:int,w:int,h:int,min:int):zrule
 address MTIMEruleDef0
diff --git a/monetdb5/modules/atoms/url.mal b/monetdb5/modules/atoms/url.mal
--- a/monetdb5/modules/atoms/url.mal
+++ b/monetdb5/modules/atoms/url.mal
@@ -100,10 +100,10 @@ command new(prot:str, host:str, fnme:str
 address URLnew3
 comment "Construct URL from protocol, host,and file";
 
-command fromstr() :url
+command fromstr()
 address URLfromString
 comment "Convert a string to an url. ";
 
-command tostr() :str
+command tostr()
 address URLtoString
 comment "Convert url to string equivalent";
diff --git a/monetdb5/modules/atoms/uuid.mal b/monetdb5/modules/atoms/uuid.mal
--- a/monetdb5/modules/atoms/uuid.mal
+++ b/monetdb5/modules/atoms/uuid.mal
@@ -1,13 +1,13 @@
 atom uuid;
 
 # the atom functions
-command cmp() :int address UUIDcompare;
-command fromstr() :uuid address UUIDfromString;
-command hash() :int address UUIDhash;
-command null() :uuid address UUIDnull;
-command read() :uuid address UUIDread;
-command tostr() :str address UUIDtoString;
-command write() :int address UUIDwrite;
+command cmp() address UUIDcompare;
+command fromstr() address UUIDfromString;
+command hash() address UUIDhash;
+command null() address UUIDnull;
+command read() address UUIDread;
+command tostr() address UUIDtoString;
+command write() address UUIDwrite;
 
 # fix up the rest of the atom definition
 command prelude():void address UUIDprelude;
diff --git a/monetdb5/modules/atoms/xml.mal b/monetdb5/modules/atoms/xml.mal
--- a/monetdb5/modules/atoms/xml.mal
+++ b/monetdb5/modules/atoms/xml.mal
@@ -17,11 +17,11 @@
 
 atom xml :str;
 
-command fromstr():xml
+command fromstr()
 address XMLfromString
 comment "Convert a string to an xml.";
 
-command tostr():str
+command tostr()
 address XMLtoString
 comment "Convert xml to string equivalent";
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic