Changeset: 4f6a8b1bb384 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4f6a8b1bb384
Modified Files:
        gdk/gdk.h
        gdk/gdk_bat.c
Branch: default
Log Message:

Use macros instead of inline functions.
In these cases, the macros are very simple.


diffs (39 lines):

diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1278,15 +1278,7 @@ BUNtoid(BAT *b, BUN p)
        return o + hi;
 }
 
-static inline BATiter
-bat_iterator(BAT *b)
-{
-       BATiter bi;
-
-       bi.b = b;
-       bi.tvid = 0;
-       return bi;
-}
+#define bat_iterator(_b)       ((BATiter) {.b = (_b), .tvid = 0})
 
 /*
  * @- BAT properties
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -50,14 +50,9 @@
 
 #define ATOMneedheap(tpe) (BATatoms[tpe].atomHeap != NULL)
 
-static char *BATstring_h = "h";
 static char *BATstring_t = "t";
 
-static inline bool
-default_ident(char *s)
-{
-       return (s == BATstring_h || s == BATstring_t);
-}
+#define default_ident(s)       ((s) == BATstring_t)
 
 void
 BATinit_idents(BAT *bn)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to