I don't see any reason to get a pointer, I want a ref instead

This commit is contained in:
King_DuckZ 2020-05-01 01:53:53 +02:00
parent 274a2fea11
commit 279a34237b
4 changed files with 5 additions and 5 deletions

View file

@ -23,7 +23,7 @@
namespace wren {
class VM;
typedef void(*foreign_method_t)(VM*);
typedef void(*foreign_method_t)(VM&);
class DefConfiguration : public Configuration {
public:

View file

@ -32,7 +32,7 @@ namespace wren {
class VM;
class DynafuncMaker;
typedef void(*foreign_method_t)(VM*);
typedef void(*foreign_method_t)(VM&);
typedef void(*finalizer_t)(void*);
struct foreign_class_t {

View file

@ -55,8 +55,8 @@ const char* raw_fetch_env (const char* name) noexcept {
return val_ptr;
}
void user_get_env (wren::VM* vm) {
set(*vm, 0, raw_fetch_env(wren::get<const char*>(*vm, 1)));
void user_get_env (wren::VM& vm) {
set(vm, 0, raw_fetch_env(wren::get<const char*>(vm, 1)));
}
class MyConfig : public wren::DefConfiguration {

View file

@ -21,7 +21,7 @@
namespace wren {
class VM;
typedef void(*foreign_method_t)(VM*);
typedef void(*foreign_method_t)(VM&);
class DynafuncMaker {
public: