diff options
Diffstat (limited to 'function.c')
-rw-r--r-- | function.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -2103,6 +2103,21 @@ func_abspath (char *o, char **argv, const char *funcname UNUSED) return o; } +#ifdef HAVE_GUILE +static char * +func_guile (char *o, char **argv, const char *funcname UNUSED) +{ + if (argv[0] && argv[0][0] != '\0') + { + char *str = guile_eval_string (argv[0]); + o = variable_buffer_output (o, str, strlen (str)); + free (str); + } + + return o; +} +#endif + /* Lookup table for builtin functions. This doesn't have to be sorted; we use a straight lookup. We might gain @@ -2156,6 +2171,9 @@ static struct function_table_entry function_table_init[] = { STRING_SIZE_TUPLE("and"), 1, 0, 0, func_and}, { STRING_SIZE_TUPLE("value"), 0, 1, 1, func_value}, { STRING_SIZE_TUPLE("eval"), 0, 1, 1, func_eval}, +#ifdef HAVE_GUILE + { STRING_SIZE_TUPLE("guile"), 0, 1, 1, func_guile}, +#endif #ifdef EXPERIMENTAL { STRING_SIZE_TUPLE("eq"), 2, 2, 1, func_eq}, { STRING_SIZE_TUPLE("not"), 0, 1, 1, func_not}, |