aboutsummaryrefslogtreecommitdiffhomepage
path: root/function.h
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2007-04-23 08:10:33 +1000
committerGravatar axel <axel@liljencrantz.se>2007-04-23 08:10:33 +1000
commitee94424b0f4753b9d9a0b075c36d5b65cadafbb4 (patch)
treeac51edb6de64732c2a7a1fe199712498f05aeda2 /function.h
parent2b7535bb518c909e2a6ce1352df93c5c6bbc084b (diff)
Add the possibility for functions which do not shadow the arguments of the calling function
darcs-hash:20070422221033-ac50b-d9544c87d0ddab10f7f503b5a1707292f266efe4.gz
Diffstat (limited to 'function.h')
-rw-r--r--function.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/function.h b/function.h
index 56f9c31a..c4e9030e 100644
--- a/function.h
+++ b/function.h
@@ -15,6 +15,21 @@
#include "util.h"
/**
+ Structure describing a function
+*/
+typedef struct function_data
+{
+ wchar_t *name;
+ wchar_t *description;
+ wchar_t *definition;
+ array_list_t *events;
+ array_list_t *named_arguments;
+ int shadows;
+}
+ function_data_t;
+
+
+/**
Initialize function data
*/
void function_init();
@@ -28,11 +43,7 @@ void function_destroy();
Add an function. The parameters values are copied and should be
freed by the caller.
*/
-void function_add( const wchar_t *name,
- const wchar_t *val,
- const wchar_t *desc,
- array_list_t *events,
- array_list_t *named_arguments );
+void function_add( function_data_t *data );
/**
Remove the function with the specified name.
@@ -92,4 +103,9 @@ int function_get_definition_offset( const wchar_t *name );
*/
array_list_t *function_get_named_arguments( const wchar_t *name );
+/**
+ Returns whether this function shadows variables of the underlying function
+*/
+int function_get_shadows( const wchar_t *name );
+
#endif