From fc166bce0a40d6fd1153b6d8a0287e14b388db9c Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 11 May 2010 23:24:25 -0400 Subject: [PATCH] vm: fix longlong accessors --- vm/alien.cpp | 4 ++-- vm/primitives.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vm/alien.cpp b/vm/alien.cpp index 6d6199b6bc..3d9289a28c 100755 --- a/vm/alien.cpp +++ b/vm/alien.cpp @@ -104,12 +104,12 @@ void *factor_vm::alien_pointer() #define DEFINE_ALIEN_ACCESSOR(name,type,from,to) \ VM_C_API void primitive_alien_##name(factor_vm *parent) \ { \ - parent->ctx->push(from(*(type*)(parent->alien_pointer()),parent)); \ + parent->ctx->push(parent->from(*(type*)(parent->alien_pointer()))); \ } \ VM_C_API void primitive_set_alien_##name(factor_vm *parent) \ { \ type *ptr = (type *)parent->alien_pointer(); \ - type value = (type)to(parent->ctx->pop(),parent); \ + type value = (type)parent->to(parent->ctx->pop()); \ *ptr = value; \ } diff --git a/vm/primitives.hpp b/vm/primitives.hpp index cf52168231..9cda1db9a8 100644 --- a/vm/primitives.hpp +++ b/vm/primitives.hpp @@ -145,8 +145,8 @@ namespace factor _(unsigned_2,u16,from_unsigned_2,to_cell) \ _(signed_1,s8,from_signed_1,to_fixnum) \ _(unsigned_1,u8,from_unsigned_1,to_cell) \ - _(float,float,from_float,to_float) \ - _(double,double,from_double,to_double) \ + _(float,float,allot_float,to_float) \ + _(double,double,allot_float,to_double) \ _(cell,void *,allot_alien,pinned_alien_offset) #define DECLARE_PRIMITIVE(name) VM_C_API void primitive_##name(factor_vm *parent);