Changeset: 617ab4ab1640 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/617ab4ab1640
Modified Files:
        monetdb5/mal/mal_interpreter.c
Branch: Dec2025
Log Message:

A little cleanup.


diffs (46 lines):

diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -260,24 +260,24 @@ malCommandCall(Client cntxt, MalStkPtr s
 /*
  * Copy the constant values onto the stack frame
  */
-#define initStack(A, S, R)                                                     
        \
-       do {                                                                    
                \
-               for (int i = (S); i < mb->vtop; i++) {          \
-                       lhs = &stk->stk[i];                                     
        \
-                       if (isVarConstant(mb, i) > 0) {                 \
-                               if (!isVarDisabled(mb, i)) {            \
-                                       rhs = &getVarConstant(mb, i);   \
-                                       if(VALcopy(A, lhs, rhs) == NULL)        
\
-                                               R = 0;                          
                \
-                               }                                               
                        \
-                       } else {                                                
                \
-                               lhs->vtype = getVarGDKType(mb, i);      \
-                               lhs->val.pval = 0;                              
        \
-                               lhs->len = 0;                                   
        \
-                               lhs->bat = isaBatType(getVarType(mb, i));       
        \
-                               lhs->allocated = false; \
-                       }                                                       
                        \
-               }                                                               
                        \
+#define initStack(A, S, R)                                                     
                \
+       do {                                                                    
                                \
+               for (int i = (S); i < mb->vtop; i++) {                          
\
+                       lhs = &stk->stk[i];                                     
                        \
+                       if (isVarConstant(mb, i) > 0) {                         
        \
+                               if (!isVarDisabled(mb, i)) {                    
        \
+                                       rhs = &getVarConstant(mb, i);           
        \
+                                       if (VALcopy(A, lhs, rhs) == NULL)       
        \
+                                               R = 0;                          
                                \
+                               }                                               
                                        \
+                       } else {                                                
                                \
+                               *lhs = (ValRecord) {                            
                \
+                                       .vtype = getVarGDKType(mb, i),          
        \
+                                       .bat = isaBatType(getVarType(mb, i)),   
\
+                                       .allocated = false,                     
                        \
+                               };                                              
                                        \
+                       }                                                       
                                        \
+               }                                                               
                                        \
        } while (0)
 
 static inline bool
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to