summaryrefslogtreecommitdiffhomepage
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 30eb29b..ebf6e61 100644
--- a/lib.c
+++ b/lib.c
@@ -3315,3 +3315,15 @@ uc_stdlib_load(uc_value_t *scope)
{
uc_function_list_register(scope, uc_stdlib_functions);
}
+
+uc_cfn_ptr_t
+uc_stdlib_function(const char *name)
+{
+ size_t i;
+
+ for (i = 0; i < ARRAY_SIZE(uc_stdlib_functions); i++)
+ if (!strcmp(uc_stdlib_functions[i].name, name))
+ return uc_stdlib_functions[i].func;
+
+ return NULL;
+}