mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Use roomof
macro for rounding up divisions
This commit is contained in:
parent
ee8bcbf405
commit
5ccb625fbb
7 changed files with 15 additions and 12 deletions
7
regenc.h
7
regenc.h
|
@ -125,10 +125,9 @@ typedef struct {
|
|||
#define POSIX_BRACKET_ENTRY_INIT(name, ctype) \
|
||||
{(short int )(sizeof(name) - 1), name, (ctype)}
|
||||
|
||||
#ifndef numberof
|
||||
# define numberof(array) (int )(sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
#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))
|
||||
|
||||
#define USE_CRNL_AS_LINE_TERMINATOR
|
||||
#define USE_UNICODE_PROPERTIES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue