From d8ed4165b08eea2361b4e516ba7769da10200f3e Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Tue, 25 Feb 2020 13:28:23 -0800 Subject: [PATCH] chore: remove `cnstr_get_scalar` and `cnstr_set_scalar` --- src/runtime/object.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/runtime/object.h b/src/runtime/object.h index 98b5076de2..3b9e765006 100644 --- a/src/runtime/object.h +++ b/src/runtime/object.h @@ -94,12 +94,6 @@ inline void cnstr_set_uint8(b_obj_arg o, unsigned offset, uint8 v) { lean_ctor_s inline void cnstr_set_uint16(b_obj_arg o, unsigned offset, uint16 v) { lean_ctor_set_uint16(o, offset, v); } inline void cnstr_set_uint32(b_obj_arg o, unsigned offset, uint32 v) { lean_ctor_set_uint32(o, offset, v); } inline void cnstr_set_uint64(b_obj_arg o, unsigned offset, uint64 v) { lean_ctor_set_uint64(o, offset, v); } -template inline T cnstr_get_scalar(b_obj_arg o, unsigned offset) { - return *((T*)((uint8_t*)(lean_ctor_obj_cptr(o)) + offset)); -} -template inline void cnstr_set_scalar(b_obj_arg o, unsigned offset, T v) { - *((T*)((uint8_t*)(lean_ctor_obj_cptr(o)) + offset)) = v; -} // ======================================= // Closures