Make rbconfig/sizeof keys US-ASCII

This commit is contained in:
Nobuyoshi Nakada 2024-10-07 19:20:08 +09:00
parent dbb1abacf0
commit 67591b545c
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-10-07 11:02:55 +00:00
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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]