Changeset: adf673d5a99e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/adf673d5a99e
Modified Files:
        monetdb5/mal/mal_module.c
        monetdb5/mal/mal_prelude.c
        monetdb5/modules/mal/manifold.c
Branch: resource_management
Log Message:

Manifold, prologue and epilogue functions also need the Client context.


diffs (59 lines):

diff --git a/monetdb5/mal/mal_module.c b/monetdb5/mal/mal_module.c
--- a/monetdb5/mal/mal_module.c
+++ b/monetdb5/mal/mal_module.c
@@ -298,7 +298,7 @@ freeModule(Module m)
                        str ret;
 
                        TRC_INFO(MAL_LOADER, "Unloading module %s\n", m->name);
-                       ret = (*(str (*)(int *)) s->func->imp) (&status);
+                       ret = (*(str (*)(Client, int *)) s->func->imp) (NULL, 
&status);
                        freeException(ret);
                        (void) status;
                }
diff --git a/monetdb5/mal/mal_prelude.c b/monetdb5/mal/mal_prelude.c
--- a/monetdb5/mal/mal_prelude.c
+++ b/monetdb5/mal/mal_prelude.c
@@ -89,7 +89,7 @@ initModule(Client c, const char *name, c
                                int ret = 0;
 
                                assert(s->func != NULL);
-                               msg = (*(str (*)(int *)) s->func->imp) (&ret);
+                               msg = (*(str (*)(Client, int *)) s->func->imp) 
(c, &ret);
                                (void) ret;
                        } else if (s && s->kind == PATTERNsymbol) {
                                void *mb = NULL;
diff --git a/monetdb5/modules/mal/manifold.c b/monetdb5/modules/mal/manifold.c
--- a/monetdb5/modules/mal/manifold.c
+++ b/monetdb5/modules/mal/manifold.c
@@ -57,16 +57,16 @@ typedef struct {
 
 // Loop through the first BAT
 // keep the last error message received
-#define MALfcn1(Type) (str (*) (Type *, void *))
-#define MALfcn2(Type) (str (*) (Type *, void *, void *))
-#define MALfcn3(Type) (str (*) (Type *, void *, void *, void *))
-#define MALfcn4(Type) (str (*) (Type *, void *, void *, void *, void *))
-#define MALfcn5(Type) (str (*) (Type *, void *, void *, void *, void *, void 
*))
+#define MALfcn1(Type) (str (*) (Client, Type *, void *))
+#define MALfcn2(Type) (str (*) (Client, Type *, void *, void *))
+#define MALfcn3(Type) (str (*) (Client, Type *, void *, void *, void *))
+#define MALfcn4(Type) (str (*) (Client, Type *, void *, void *, void *, void 
*))
+#define MALfcn5(Type) (str (*) (Client, Type *, void *, void *, void *, void 
*, void *))
 #define ManifoldLoop(N, Type, ...)                                             
                                \
        do {                                                                    
                                                        \
                Type *v = (Type *) mut->args[0].first;                          
                        \
                for (;;) {                                                      
                                                        \
-                       msg = (*(MALfcn##N(Type) mut->pci->fcn))(v, 
__VA_ARGS__);       \
+                       msg = (*(MALfcn##N(Type) mut->pci->fcn))(mut->cntxt, v, 
__VA_ARGS__); \
                        if (msg)                                                
                                                        \
                                break;                                          
                                                        \
                        if (++oo == olimit)                                     
                                                \
@@ -115,7 +115,7 @@ typedef struct {
                case TYPE_str:                                                  
                                                \
                default: {                                                      
                                                        \
                        for (;;) {                                              
                                                        \
-                           msg = (*(MALfcn##N(str) mut->pci->fcn))(&y, 
__VA_ARGS__); \
+                           msg = (*(MALfcn##N(str) mut->pci->fcn))(mut->cntxt, 
&y, __VA_ARGS__); \
                                if (msg)                                        
                                                        \
                                        break;                                  
                                                        \
                                if (bunfastapp(mut->args[0].b, (void*) y) != 
GDK_SUCCEED) \
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to