From 3b98f3439e33b15bba2036c402f9925340fdb2b9 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 29 Jun 2013 23:23:43 -0700 Subject: Poison std::string and use the various string classes --- src/map/magic-expr.hpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/map/magic-expr.hpp') diff --git a/src/map/magic-expr.hpp b/src/map/magic-expr.hpp index 7f3e1e1..2bffcbc 100644 --- a/src/map/magic-expr.hpp +++ b/src/map/magic-expr.hpp @@ -16,34 +16,34 @@ * . : any, except for fail/undef * _ : any, including fail, but not undef */ -typedef struct fun +struct fun_t { - const char *name; - const char *signature; + ZString name; + ZString signature; char ret_ty; int (*fun)(dumb_ptr env, val_t *result, const_array arga); -} fun_t; +}; -typedef struct op +struct op_t { - const char *name; - const char *signature; + ZString name; + ZString signature; int (*op)(dumb_ptr env, const_array arga); -} op_t; +}; /** * Retrieves a function by name * @param name The name to look up - * @return A function of that name, or NULL, and a function index + * @return A function of that name, or NULL. */ -fun_t *magic_get_fun(const std::string& name, int *index); +fun_t *magic_get_fun(ZString name); /** * Retrieves an operation by name * @param name The name to look up * @return An operation of that name, or NULL, and a function index */ -op_t *magic_get_op(const std::string& name, int *index); +op_t *magic_get_op(ZString name); /** * Evaluates an expression and stores the result in `dest' @@ -58,7 +58,7 @@ int magic_eval_int(dumb_ptr env, dumb_ptr expr); /** * Evaluates an expression and coerces the result into a string */ -std::string magic_eval_str(dumb_ptr env, dumb_ptr expr); +FString magic_eval_str(dumb_ptr env, dumb_ptr expr); dumb_ptr magic_new_expr(EXPR ty); -- cgit v1.2.3-60-g2f50