mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
1656b70c0e
commit
010752631b
1 changed files with 3 additions and 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;
|
||||
|
|
Loading…
Reference in a new issue