changeset 664:57fc2ec4efdc

Some more work.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 16 Apr 2013 09:06:34 +0300
parents 05eb24a608f0
children d168fcf6f493
files dmeval.c dmeval.h
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/dmeval.c	Tue Apr 16 08:33:43 2013 +0300
+++ b/dmeval.c	Tue Apr 16 09:06:34 2013 +0300
@@ -122,7 +122,7 @@
 }
 
 
-DMEvalId *dm_eval_add_func(DMEvalContext *ev, const char *name, DMValue (*func)(DMValue))
+DMEvalId *dm_eval_add_func(DMEvalContext *ev, const char *name, DMValue (*func)(DMValue *))
 {
     DMEvalId *id = dm_eval_add_id(ev, name, ID_VAR);
     if (id == NULL)
@@ -240,10 +240,10 @@
     if (node == NULL)
         return NULL;
 
-    node->op = src->op;
-    node->val = src->val;
-    node->id = src->id;
-    node->subexpr = src->subexpr;
+    node->op       = src->op;
+    node->val      = src->val;
+    node->id       = src->id;
+    node->subexpr  = src->subexpr;
 
     return dm_eval_insert_node(list, node);
 }
@@ -759,8 +759,8 @@
 
 static int dm_eval_get(DMEvalContext *ev, DMEvalNode *node, DMValue *result)
 {
-    DMValue tmp;
-    
+    DMValue tmp[16];
+
     if (node == NULL)
         return -32;
     
--- a/dmeval.h	Tue Apr 16 08:33:43 2013 +0300
+++ b/dmeval.h	Tue Apr 16 09:06:34 2013 +0300
@@ -74,7 +74,7 @@
 
 DMEvalId *dm_eval_find_id(DMEvalContext *ev, const char *name);
 DMEvalId *dm_eval_add_var(DMEvalContext *ev, const char *name, DMValue *var);
-DMEvalId *dm_eval_add_func(DMEvalContext *ev, const char *name, DMValue (*func)(DMValue));
+DMEvalId *dm_eval_add_func(DMEvalContext *ev, const char *name, DMValue (*func)(DMValue *));
 
 DMEvalContext *dm_eval_new(void);
 void dm_eval_close(DMEvalContext *ev);