mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
internal/imemo.h rework
Arrange contents and eliminate macros, to make them readable. Macro IFUNC_NEW was deleted because there was only one usage.
This commit is contained in:
parent
63c9f620cf
commit
989068cf70
Notes:
git
2019-12-26 20:46:03 +09:00
4 changed files with 160 additions and 123 deletions
|
@ -30,6 +30,8 @@
|
|||
#include "internal/sanitizers.h"
|
||||
|
||||
#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
|
||||
#define roomof(x, y) (((x) + (y) - 1) / (y))
|
||||
#define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
|
||||
|
||||
/* Prevent compiler from reordering access */
|
||||
#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue