summaryrefslogtreecommitdiff
path: root/src/map/magic-expr.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-03-30 23:14:12 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-03-31 10:18:49 -0700
commit1a651243bb2c8e18baa9aac30ac52a62185074e7 (patch)
treedd2c0bfc448faef129fb64edec9f64d2ab12bfe5 /src/map/magic-expr.hpp
parent769e8ac9c17779a15492d7fcfc1931c014670c2d (diff)
downloadtmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.tar.gz
tmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.tar.bz2
tmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.tar.xz
tmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.zip
Be stricter about most arrays
Diffstat (limited to 'src/map/magic-expr.hpp')
-rw-r--r--src/map/magic-expr.hpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map/magic-expr.hpp b/src/map/magic-expr.hpp
index 79fdc3f..b2b0dd2 100644
--- a/src/map/magic-expr.hpp
+++ b/src/map/magic-expr.hpp
@@ -3,6 +3,8 @@
# include "magic-interpreter.hpp"
+# include "../range/slice.hpp"
+
# include "../strings/fwd.hpp"
# include "../strings/zstring.hpp"
@@ -24,14 +26,14 @@ struct fun_t
ZString name;
ZString signature;
char ret_ty;
- int (*fun)(dumb_ptr<env_t> env, val_t *result, const_array<val_t> arga);
+ int (*fun)(dumb_ptr<env_t> env, val_t *result, Slice<val_t> arga);
};
struct op_t
{
ZString name;
ZString signature;
- int (*op)(dumb_ptr<env_t> env, const_array<val_t> arga);
+ int (*op)(dumb_ptr<env_t> env, Slice<val_t> arga);
};
/**
@@ -72,7 +74,7 @@ void magic_copy_var(val_t *dest, val_t *src);
void magic_random_location(location_t *dest, dumb_ptr<area_t> area);
// ret -1: not a string, ret 1: no such item, ret 0: OK
-int magic_find_item(const_array<val_t> args, int index, struct item *item, int *stackable);
+int magic_find_item(Slice<val_t> args, int index, struct item *item, int *stackable);
# define GET_ARG_ITEM(index, dest, stackable) \
switch (magic_find_item(args, index, &dest, &stackable)) \