diff --git a/include/cubescript/cubescript_conf.hh b/include/cubescript/cubescript_conf.hh index fc9b33b..2a32ab6 100644 --- a/include/cubescript/cubescript_conf.hh +++ b/include/cubescript/cubescript_conf.hh @@ -11,9 +11,9 @@ namespace cscript { struct cs_ident; struct cs_value; - using cs_value_r = ostd::PointerRange; - using cs_ident_r = ostd::PointerRange; - using cs_const_ident_r = ostd::PointerRange; + using cs_value_r = ostd::IteratorRange; + using cs_ident_r = ostd::IteratorRange; + using cs_const_ident_r = ostd::IteratorRange; } /* configurable section */ diff --git a/src/cs_vm.cc b/src/cs_vm.cc index c1ecaa8..f1a57db 100644 --- a/src/cs_vm.cc +++ b/src/cs_vm.cc @@ -1645,14 +1645,14 @@ void cs_state::run(cs_ident *id, cs_value_r args, cs_value &ret) { case cs_ident_type::Command: if (nargs < static_cast(id)->get_num_args()) { cs_value buf[MaxArguments]; - memcpy(buf, args.data(), args.size() * sizeof(cs_value)); + memcpy(buf, &args[0], args.size() * sizeof(cs_value)); callcommand( *this, static_cast(id), buf, ret, nargs, false ); } else { callcommand( - *this, static_cast(id), args.data(), + *this, static_cast(id), &args[0], ret, nargs, false ); } @@ -1694,7 +1694,7 @@ void cs_state::run(cs_ident *id, cs_value_r args, cs_value &ret) { break; } cs_call_alias( - *this, a, args.data(), ret, nargs, nargs, 0, 0, CsRetNull + *this, a, &args[0], ret, nargs, nargs, 0, 0, CsRetNull ); break; }