mruby/c VM Source Code master (2026/08/06)
Loading...
Searching...
No Matches
boxing_no.h File Reference

mruby/c mrbc_value definition. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RObject
 Value object. Default version. More...

Macros

#define mrbc_type(o)
#define mrbc_integer(o)
#define mrbc_float(o)
#define mrbc_symbol(o)
#define mrbc_integer_value(n)
#define mrbc_float_value(vm, n)
#define mrbc_nil_value()
#define mrbc_true_value()
#define mrbc_false_value()
#define mrbc_bool_value(n)
#define mrbc_symbol_value(n)
#define mrbc_immediate_value(...)
#define mrbc_immediate_value1(type)
#define mrbc_immediate_value2(type, v2)

Typedefs

typedef struct RObject mrbc_value
 Value object. Default version.

Functions

static void mrbc_set_integer (mrbc_value *p, mrbc_int_t n)
static void mrbc_set_float (mrbc_value *p, mrbc_float_t d)
static void mrbc_set_nil (mrbc_value *p)
static void mrbc_set_true (mrbc_value *p)
static void mrbc_set_false (mrbc_value *p)
static void mrbc_set_bool (mrbc_value *p, int n)
static void mrbc_set_symbol (mrbc_value *p, mrbc_sym sym_id)
static void mrbc_set_tt (mrbc_value *p, mrbc_vtype type)

Detailed Description

mruby/c mrbc_value definition.

Copyright (C) 2015-      Kyushu Institute of Technology.
Copyright (C) 2015-2026  Shimane IT Open-Innovation Center.
Copyright (C) 2026-      Shimane Institute for Industrial Technology.

This file is distributed under BSD 3-Clause License.

Definition in file boxing_no.h.

Macro Definition Documentation

◆ mrbc_bool_value

#define mrbc_bool_value ( n)
Value:
struct RObject mrbc_value
Value object. Default version.
@ MRBC_TT_FALSE
FalseClass.
Definition value.h:82
@ MRBC_TT_TRUE
TrueClass.
Definition value.h:85

Definition at line 73 of file boxing_no.h.

◆ mrbc_false_value

#define mrbc_false_value ( )
Value:

Definition at line 72 of file boxing_no.h.

◆ mrbc_float

#define mrbc_float ( o)
Value:
((o).d)

get float(double) value from mrbc_value.

Definition at line 60 of file boxing_no.h.

◆ mrbc_float_value

#define mrbc_float_value ( vm,
n )
Value:
((mrbc_value){.tt = MRBC_TT_FLOAT, .d=(n)})
@ MRBC_TT_FLOAT
Float.
Definition value.h:88

Definition at line 68 of file boxing_no.h.

◆ mrbc_immediate_value

#define mrbc_immediate_value ( ...)
Value:
MRBC_arg_choice(__VA_ARGS__, mrbc_immediate_value2, mrbc_immediate_value1) (__VA_ARGS__)
#define mrbc_immediate_value2(type, v2)
Definition boxing_no.h:78
#define mrbc_immediate_value1(type)
Definition boxing_no.h:76

Definition at line 75 of file boxing_no.h.

◆ mrbc_immediate_value1

#define mrbc_immediate_value1 ( type)
Value:
((mrbc_value){.tt=type})

Definition at line 76 of file boxing_no.h.

◆ mrbc_immediate_value2

#define mrbc_immediate_value2 ( type,
v2 )
Value:
((mrbc_value){.tt=type, v2})

Definition at line 78 of file boxing_no.h.

◆ mrbc_integer

#define mrbc_integer ( o)
Value:
((o).i)

get int value from mrbc_value.

Definition at line 58 of file boxing_no.h.

◆ mrbc_integer_value

#define mrbc_integer_value ( n)
Value:
((mrbc_value){.tt = MRBC_TT_INTEGER, .i=(n)})
@ MRBC_TT_INTEGER
Integer.
Definition value.h:86

Definition at line 66 of file boxing_no.h.

◆ mrbc_nil_value

#define mrbc_nil_value ( )
Value:
@ MRBC_TT_NIL
NilClass.
Definition value.h:81

Definition at line 70 of file boxing_no.h.

◆ mrbc_symbol

#define mrbc_symbol ( o)
Value:
((o).sym_id)

get symbol value (mrbc_sym) from mrbc_value.

Definition at line 62 of file boxing_no.h.

◆ mrbc_symbol_value

#define mrbc_symbol_value ( n)
Value:
((mrbc_value){.tt = MRBC_TT_SYMBOL, .sym_id=(n)})
@ MRBC_TT_SYMBOL
Symbol.
Definition value.h:89

Definition at line 74 of file boxing_no.h.

◆ mrbc_true_value

#define mrbc_true_value ( )
Value:

Definition at line 71 of file boxing_no.h.

◆ mrbc_type

#define mrbc_type ( o)
Value:
((o).tt)

get the type (mrbc_vtype) from mrbc_value.

Definition at line 57 of file boxing_no.h.

Typedef Documentation

◆ mrbc_value

typedef struct RObject mrbc_value

Value object. Default version.

Function Documentation

◆ mrbc_set_bool()

void mrbc_set_bool ( mrbc_value * p,
int n )
inlinestatic

Definition at line 114 of file boxing_no.h.

Here is the caller graph for this function:

◆ mrbc_set_false()

void mrbc_set_false ( mrbc_value * p)
inlinestatic

Definition at line 109 of file boxing_no.h.

Here is the caller graph for this function:

◆ mrbc_set_float()

void mrbc_set_float ( mrbc_value * p,
mrbc_float_t d )
inlinestatic

Definition at line 92 of file boxing_no.h.

Here is the caller graph for this function:

◆ mrbc_set_integer()

void mrbc_set_integer ( mrbc_value * p,
mrbc_int_t n )
inlinestatic

Definition at line 85 of file boxing_no.h.

Here is the caller graph for this function:

◆ mrbc_set_nil()

void mrbc_set_nil ( mrbc_value * p)
inlinestatic

Definition at line 99 of file boxing_no.h.

Here is the caller graph for this function:

◆ mrbc_set_symbol()

void mrbc_set_symbol ( mrbc_value * p,
mrbc_sym sym_id )
inlinestatic

Definition at line 119 of file boxing_no.h.

Here is the caller graph for this function:

◆ mrbc_set_true()

void mrbc_set_true ( mrbc_value * p)
inlinestatic

Definition at line 104 of file boxing_no.h.

Here is the caller graph for this function:

◆ mrbc_set_tt()

void mrbc_set_tt ( mrbc_value * p,
mrbc_vtype type )
inlinestatic

Definition at line 125 of file boxing_no.h.

Here is the caller graph for this function: