зеркало из https://github.com/github/ruby.git
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:
Родитель
1656b70c0e
Коммит
010752631b
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче