Ruby: include/ruby/internal/arithmetic/long_long.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
long_long.h File Reference

Arithmetic conversion between C's `long long` and Ruby's. More...

`#include "ruby/internal/value.h"`
`#include "ruby/internal/dllexport.h"`
`#include "ruby/internal/special_consts.h"`
`#include "ruby/backward/2/long_long.h"`

Go to the source code of this file.

## Macros
#define | RB_LL2NUM rb_ll2inum
#define | RB_ULL2NUM rb_ull2inum
#define | LL2NUM RB_LL2NUM
#define | ULL2NUM RB_ULL2NUM
#define | RB_NUM2LL rb_num2ll_inline
#define | RB_NUM2ULL rb_num2ull
#define | NUM2LL RB_NUM2LL
#define | NUM2ULL RB_NUM2ULL

## Functions
VALUE | rb_ll2inum (LONG_LONG)
VALUE | rb_ull2inum (unsigned LONG_LONG)
LONG_LONG | rb_num2ll (VALUE)
unsigned LONG_LONG | rb_num2ull (VALUE)

## Detailed Description

Arithmetic conversion between C's `long long` and Ruby's.

Author
  Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org

Copyright
  This file is a part of the programming language Ruby. Permission is hereby granted, to either redistribute and/or modify this file, provided that the conditions mentioned in the file COPYING are met. Consult the file for details.

Warning
  Symbols prefixed with either `RBIMPL` or `rbimpl` are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.

Note
  To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance `__VA_ARGS__` is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.

Definition in file long_long.h.

## Macro Definition Documentation

## ◆ LL2NUM

#define LL2NUM RB_LL2NUM

Definition at line 30 of file long_long.h.

## ◆ NUM2LL

#define NUM2LL RB_NUM2LL

Definition at line 34 of file long_long.h.

## ◆ NUM2ULL

#define NUM2ULL RB_NUM2ULL

Definition at line 35 of file long_long.h.

## ◆ RB_LL2NUM

#define RB_LL2NUM rb_ll2inum

Definition at line 28 of file long_long.h.

## ◆ RB_NUM2LL

#define RB_NUM2LL rb_num2ll_inline

Definition at line 32 of file long_long.h.

## ◆ RB_NUM2ULL

#define RB_NUM2ULL rb_num2ull

Definition at line 33 of file long_long.h.

## ◆ RB_ULL2NUM

#define RB_ULL2NUM rb_ull2inum

Definition at line 29 of file long_long.h.

## ◆ ULL2NUM

#define ULL2NUM RB_ULL2NUM

Definition at line 31 of file long_long.h.

## Function Documentation

## ◆ rb_ll2inum()

VALUE rb_ll2inum | ( | LONG_LONG |  | ) |

## ◆ rb_num2ll()

LONG_LONG rb_num2ll | ( | VALUE |  | ) |

Referenced by rb_num2ull().

## ◆ rb_num2ull()

unsigned LONG_LONG rb_num2ull | ( | VALUE |  | ) |

References RB_FIX2LONG, and rb_num2ll().

## ◆ rb_ull2inum()

VALUE rb_ull2inum | ( | unsigned | LONG_LONG | ) |