Make rbconfig/sizeof keys US-ASCII
This commit is contained in:
parent
dbb1abacf0
commit
67591b545c
Notes:
git
2024-10-07 11:02:55 +00:00
@ -82,7 +82,7 @@ Init_limits(void)
|
||||
#define MAX2NUM(name) ULONG2NUM(name ## _MAX)
|
||||
#define MIN2NUM(name) LONG2NUM(name ## _MIN)
|
||||
#endif
|
||||
#define DEFINE(k, v) rb_hash_aset(h, rb_str_new_lit(#k), v)
|
||||
#define DEFINE(k, v) rb_hash_aset(h, rb_usascii_str_new_lit(#k), v)
|
||||
|
||||
% limits.each do |type|
|
||||
#ifdef <%= type %>_MAX
|
||||
|
@ -47,8 +47,8 @@ Init_sizeof(void)
|
||||
VALUE mRbConfig = rb_define_module("RbConfig");
|
||||
rb_define_const(mRbConfig, "SIZEOF", s);
|
||||
|
||||
#define DEFINE(type, size) rb_hash_aset(s, rb_str_new_lit(#type), INT2FIX(SIZEOF_##size))
|
||||
#define DEFINE_SIZE(type) rb_hash_aset(s, rb_str_new_lit(#type), INT2FIX(sizeof(type)))
|
||||
#define DEFINE(type, size) rb_hash_aset(s, rb_usascii_str_new_lit(#type), INT2FIX(SIZEOF_##size))
|
||||
#define DEFINE_SIZE(type) rb_hash_aset(s, rb_usascii_str_new_lit(#type), INT2FIX(sizeof(type)))
|
||||
|
||||
% types.each do |type|
|
||||
% if sizes[type]
|
||||
|
Loading…
x
Reference in New Issue
Block a user