diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-22 07:15:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-02-22 07:15:57 +0000 |
commit | 569b7b68033085270785478967b411ac96f87d05 (patch) | |
tree | c3f3e0745340ae153875f81a732b777906a4953d | |
parent | b138a08e507531d906c17ced4b770bd776e02cbf (diff) | |
download | ruby-569b7b68033085270785478967b411ac96f87d05.tar.gz |
vm_core.h: CoreDataFromValue
* vm_core.h (CoreDataFromValue): split as an expression from
GetCoreDataFromValue, which can be a statement only.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | vm_core.h | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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; |