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 { namespace wren {
class VM; class VM;
typedef void(*foreign_method_t)(VM*); typedef void(*foreign_method_t)(VM&);
class DefConfiguration : public Configuration { class DefConfiguration : public Configuration {
public: public:

View file

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

View file

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

View file

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