aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vm_core.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/vm_core.h b/vm_core.h
index 7b5adbcbd3..38de35636f 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -250,12 +250,11 @@ struct rb_call_cache {
};
#if 1
-#define GetCoreDataFromValue(obj, type, ptr) do { \
- (ptr) = (type*)DATA_PTR(obj); \
-} while (0)
+#define CoreDataFromValue(obj, type) (type*)DATA_PTR(obj)
#else
-#define GetCoreDataFromValue(obj, type, ptr) Data_Get_Struct((obj), type, (ptr))
+#define CoreDataFromValue(obj, type) (type*)rb_data_object_get(obj)
#endif
+#define GetCoreDataFromValue(obj, type, ptr) ((ptr) = CoreDataFromValue((obj), type))
typedef struct rb_iseq_location_struct {
VALUE path;