Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Functions
limits.c File Reference
`#include <limits.h>`
`#include "ruby/ruby.h"`

Go to the source code of this file.

## Macros
#define | MAX2NUM(name) ULONG2NUM(name ## _MAX)
#define | MIN2NUM(name) LONG2NUM(name ## _MIN)
#define | DEFINE(k, v) rb_hash_aset(h, rb_str_new_cstr(#k), v)

## Functions
void | Init_limits (void)

## Macro Definition Documentation

## ◆ DEFINE

#define DEFINE | ( |  | k,
|  |  | v
| ) |  | rb_hash_aset(h, rb_str_new_cstr(#k), v)

## ◆ MAX2NUM

#define MAX2NUM | ( |  | name | ) | ULONG2NUM(name ## _MAX)

## ◆ MIN2NUM

#define MIN2NUM | ( |  | name | ) | LONG2NUM(name ## _MIN)

## Function Documentation

## ◆ Init_limits()

void Init_limits | ( | void |  | ) |

Definition at line 14 of file limits.c.

References CHAR_MAX, CHAR_MIN, DEFINE, FIXNUM_MAX, FIXNUM_MIN, h, INT_MAX, INT_MIN, LONG_MAX, LONG_MIN, MAX2NUM, MIN2NUM, rb_define_const(), rb_define_module(), rb_hash_new(), SCHAR_MAX, SCHAR_MIN, SHRT_MAX, SHRT_MIN, UCHAR_MAX, UINT_MAX, ULONG_MAX, USHRT_MAX, WCHAR_MAX, and WCHAR_MIN.

Referenced by Init_sizeof().