mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Refactor so RDoc picks up RbConfig::{SIZEOF,LIMITS}
This commit is contained in:
parent
e165d92d37
commit
9bf1049dfb
2 changed files with 4 additions and 2 deletions
|
@ -55,7 +55,8 @@ void
|
||||||
Init_limits(void)
|
Init_limits(void)
|
||||||
{
|
{
|
||||||
VALUE h = rb_hash_new();
|
VALUE h = rb_hash_new();
|
||||||
rb_define_const(rb_define_module("RbConfig"), "LIMITS", h);
|
VALUE mRbConfig = rb_define_module("RbConfig");
|
||||||
|
rb_define_const(mRbConfig, "LIMITS", h);
|
||||||
|
|
||||||
#ifdef HAVE_LONG_LONG
|
#ifdef HAVE_LONG_LONG
|
||||||
#ifndef ULLONG_MAX
|
#ifndef ULLONG_MAX
|
||||||
|
|
|
@ -30,7 +30,8 @@ void
|
||||||
Init_sizeof(void)
|
Init_sizeof(void)
|
||||||
{
|
{
|
||||||
VALUE s = rb_hash_new();
|
VALUE s = rb_hash_new();
|
||||||
rb_define_const(rb_define_module("RbConfig"), "SIZEOF", s);
|
VALUE mRbConfig = rb_define_module("RbConfig");
|
||||||
|
rb_define_const(mRbConfig, "SIZEOF", s);
|
||||||
|
|
||||||
#define DEFINE(type, size) rb_hash_aset(s, rb_str_new_cstr(#type), INT2FIX(SIZEOF_##size))
|
#define DEFINE(type, size) rb_hash_aset(s, rb_str_new_cstr(#type), INT2FIX(SIZEOF_##size))
|
||||||
#define DEFINE_SIZE(type) rb_hash_aset(s, rb_str_new_cstr(#type), INT2FIX(sizeof(type)))
|
#define DEFINE_SIZE(type) rb_hash_aset(s, rb_str_new_cstr(#type), INT2FIX(sizeof(type)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue