vm: fix longlong accessors

db4
Slava Pestov 2010-05-11 23:24:25 -04:00
parent 0cde5c8fb5
commit c2558e6a66
2 changed files with 4 additions and 4 deletions

View File

@ -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; \
}

View File

@ -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);