mruby/c VM Source Code release 4.0.0
Loading...
Searching...
No Matches
value.h File Reference

mruby/c value definitions More...

#include "boxing_no.h"
Include dependency graph for value.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RBasic

Macros

#define MRBC_TT_INC_DEC_THRESHOLD   MRBC_TT_MODULE
#define MRBC_TT_MAXVAL   MRBC_TT_EXCEPTION
#define MRBC_OBJECT_HEADER   uint16_t ref_count
#define MRBC_INIT_OBJECT_HEADER(p, t)
#define MRBC_INIT_OBJECT_HEADER_DI(t)
#define SET_RETURN(n)
#define SET_NIL_RETURN()
#define SET_FALSE_RETURN()
#define SET_TRUE_RETURN()
#define SET_BOOL_RETURN(n)
#define SET_INT_RETURN(n)
#define SET_FLOAT_RETURN(n)
#define GET_TT_ARG(n)
#define GET_INT_ARG(n)
#define GET_ARY_ARG(n)
#define GET_ARG(n)
#define GET_FLOAT_ARG(n)
#define GET_STRING_ARG(n)
#define MRBC_ISNUMERIC(val)
#define MRBC_TO_INT(val)
#define MRBC_TO_FLOAT(val)
#define MRBC_VAL_I(...)
#define MRBC_VAL_F(...)
#define MRBC_VAL_S(...)
#define MRBC_TO_I(val)
#define MRBC_TO_F(val)
#define MRBC_TO_S(val)
#define MRBC_ARG(n)
#define MRBC_ARG_I(...)
#define MRBC_ARG_F(...)
#define MRBC_ARG_S(...)
#define MRBC_ARG_B(...)
#define MRBC_KW_ARG(...)
#define MRBC_KW_ARG_decl1(kw)
#define MRBC_KW_ARG_decl2(kw)
#define MRBC_KW_DICT(dict)
#define MRBC_KW_ISVALID(kw)
#define MRBC_KW_MANDATORY(...)
#define MRBC_KW_MANDATORY_decl1(kw)
#define MRBC_KW_END()
#define MRBC_KW_DELETE(...)
#define MRBC_KW_DELETE_decl(kw)
#define MRBC_PTR_TO_UINT32(p)

Typedefs

typedef int32_t mrbc_int_t
typedef uint32_t mrbc_uint_t
typedef float mrbc_float_t
typedef int16_t mrbc_sym
 mruby/c symbol ID
typedef void(* mrbc_func_t) (struct VM *vm, struct RObject *v, int argc)
typedef struct RObject mrbc_object

Enumerations

enum  mrbc_vtype {
  MRBC_TT_JMPUW = -5 , MRBC_TT_BREAK = -4 , MRBC_TT_RETURN_BLK = -3 , MRBC_TT_RETURN = -2 ,
  MRBC_TT_HANDLE = -1 , MRBC_TT_EMPTY = 0 , MRBC_TT_NIL = 1 , MRBC_TT_FALSE = 2 ,
  MRBC_TT_TRUE = 3 , MRBC_TT_INTEGER = 4 , MRBC_TT_FIXNUM = 4 , MRBC_TT_FLOAT = 5 ,
  MRBC_TT_SYMBOL = 6 , MRBC_TT_CLASS = 7 , MRBC_TT_MODULE = 8 , MRBC_TT_OBJECT = 9 ,
  MRBC_TT_PROC = 10 , MRBC_TT_ARRAY = 11 , MRBC_TT_STRING = 12 , MRBC_TT_RANGE = 13 ,
  MRBC_TT_HASH = 14 , MRBC_TT_EXCEPTION = 15
}
enum  mrbc_error_code {
  E_NOMEMORY_ERROR = 1 , E_RUNTIME_ERROR , E_TYPE_ERROR , E_ARGUMENT_ERROR ,
  E_INDEX_ERROR , E_RANGE_ERROR , E_NAME_ERROR , E_NOMETHOD_ERROR ,
  E_SCRIPT_ERROR , E_SYNTAX_ERROR , E_LOCALJUMP_ERROR , E_REGEXP_ERROR ,
  E_NOTIMP_ERROR , E_FLOATDOMAIN_ERROR , E_KEY_ERROR , E_BYTECODE_ERROR
}

Functions

static void mrbc_incref (mrbc_value *v)
static void mrbc_decref (mrbc_value *v)
static void mrbc_decref_empty (mrbc_value *v)
static void mrbc_delete (mrbc_value *v)
static uint16_t bin_to_uint16 (const void *s)
static uint32_t bin_to_uint32 (const void *s)
static double bin_to_double64 (const void *s)
static void uint32_to_bin (uint32_t v, void *d)
static void uint16_to_bin (uint16_t v, void *d)

Variables

void(*const mrbc_delfunc [])(mrbc_value *)

Detailed Description

mruby/c value definitions

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 value.h.

Macro Definition Documentation

◆ GET_ARG

#define GET_ARG ( n)
Value:
(v[(n)])

Definition at line 261 of file value.h.

◆ GET_ARY_ARG

#define GET_ARY_ARG ( n)
Value:
(v[(n)])

Definition at line 260 of file value.h.

◆ GET_FLOAT_ARG

#define GET_FLOAT_ARG ( n)
Value:
(v[(n)].d)

Definition at line 262 of file value.h.

◆ GET_INT_ARG

#define GET_INT_ARG ( n)
Value:
(v[(n)].i)

Definition at line 259 of file value.h.

◆ GET_STRING_ARG

#define GET_STRING_ARG ( n)
Value:
(v[(n)].string->data)

Definition at line 263 of file value.h.

◆ GET_TT_ARG

#define GET_TT_ARG ( n)
Value:
(v[(n)].tt)

Definition at line 258 of file value.h.

◆ MRBC_ARG

#define MRBC_ARG ( n)
Value:
mrbc_arg(vm, v, argc, (n))
mrbc_value * mrbc_arg(struct VM *vm, mrbc_value v[], int argc, int n)
Definition value.c:549

(beta) Get a N'th argument pointer.

Examples:

mrbc_value *arg1 = MRBC_ARG(1); // Gets a 1st argument pointer.
struct RObject mrbc_value
Value object. Default version.
#define MRBC_ARG(n)
Definition value.h:393

Definition at line 393 of file value.h.

◆ MRBC_ARG_B

#define MRBC_ARG_B ( ...)
Value:
MRBC_arg_choice(__VA_ARGS__, mrbc_arg_b2, mrbc_arg_b) (vm,v,argc,__VA_ARGS__)
int mrbc_arg_b2(struct VM *vm, mrbc_value v[], int argc, int n, int default_value)
Definition value.c:778
int mrbc_arg_b(struct VM *vm, mrbc_value v[], int argc, int n)
Definition value.c:741

(beta) Get a N'th True/False argument as a C integer.

Examples:

int arg1 = MRBC_ARG_B(1); // Get a 1st True/False argument as an integer.
int arg1 = MRBC_ARG_B(1, 0); // with default value False.
#define MRBC_ARG_B(...)
Definition value.h:397

Definition at line 397 of file value.h.

◆ MRBC_ARG_F

#define MRBC_ARG_F ( ...)
Value:
MRBC_arg_choice(__VA_ARGS__, mrbc_arg_f2, mrbc_arg_f) (vm,v,argc,__VA_ARGS__)
mrbc_float_t mrbc_arg_f(struct VM *vm, mrbc_value v[], int argc, int n)
Definition value.c:630
mrbc_float_t mrbc_arg_f2(struct VM *vm, mrbc_value v[], int argc, int n, mrbc_float_t default_value)
Definition value.c:667

(beta) Get a N'th argument as a C float (double).

Examples:

double arg1 = MRBC_ARG_F(1); // Get a 1st argument as an double.
double arg1 = MRBC_ARG_F(1, 2.7); // with default value 2.7.
#define MRBC_ARG_F(...)
Definition value.h:395

Definition at line 395 of file value.h.

◆ MRBC_ARG_I

#define MRBC_ARG_I ( ...)
Value:
MRBC_arg_choice(__VA_ARGS__, mrbc_arg_i2, mrbc_arg_i) (vm,v,argc,__VA_ARGS__)
mrbc_int_t mrbc_arg_i2(struct VM *vm, mrbc_value v[], int argc, int n, mrbc_int_t default_value)
Definition value.c:610
mrbc_int_t mrbc_arg_i(struct VM *vm, mrbc_value v[], int argc, int n)
Definition value.c:573

(beta) Get a N'th argument as a C integer.

Examples:

int arg1 = MRBC_ARG_I(1); // Get a 1st argument as an integer.
int arg1 = MRBC_ARG_I(1, 111); // with default value 111.
#define MRBC_ARG_I(...)
Definition value.h:394

Definition at line 394 of file value.h.

◆ MRBC_ARG_S

#define MRBC_ARG_S ( ...)
Value:
MRBC_arg_choice(__VA_ARGS__, mrbc_arg_s2, mrbc_arg_s) (vm,v,argc,__VA_ARGS__)
const char * mrbc_arg_s(struct VM *vm, mrbc_value v[], int argc, int n)
Definition value.c:687
const char * mrbc_arg_s2(struct VM *vm, mrbc_value v[], int argc, int n, const char *default_value)
Definition value.c:721

(beta) Get a N'th argument as a C string.

Examples:

const char *arg1 = MRBC_ARG_S(1); // Get a 1st argument as an double.
const char *arg1 = MRBC_ARG_S(1,"DEFAULT"); // with default value "DEFAULT".
#define MRBC_ARG_S(...)
Definition value.h:396

Definition at line 396 of file value.h.

◆ MRBC_INIT_OBJECT_HEADER

#define MRBC_INIT_OBJECT_HEADER ( p,
t )
Value:
(p)->ref_count = 1

Definition at line 146 of file value.h.

◆ MRBC_INIT_OBJECT_HEADER_DI

#define MRBC_INIT_OBJECT_HEADER_DI ( t)
Value:
.ref_count = 1,

Definition at line 147 of file value.h.

◆ MRBC_ISNUMERIC

#define MRBC_ISNUMERIC ( val)
Value:
((val).tt == MRBC_TT_INTEGER || (val).tt == MRBC_TT_FLOAT)
@ MRBC_TT_FLOAT
Float.
Definition value.h:88
@ MRBC_TT_INTEGER
Integer.
Definition value.h:86

Check the val is numeric.

Definition at line 276 of file value.h.

◆ MRBC_KW_ARG

#define MRBC_KW_ARG ( ...)
Value:
MRBC_each(__VA_ARGS__)( MRBC_KW_ARG_decl1, __VA_ARGS__ ) \
if( mrbc_type(v[argc+1]) == MRBC_TT_HASH ) { \
MRBC_each(__VA_ARGS__)( MRBC_KW_ARG_decl2, __VA_ARGS__ ) \
}
#define mrbc_type(o)
Definition boxing_no.h:57
#define MRBC_KW_ARG_decl2(kw)
Definition value.h:433
#define MRBC_KW_ARG_decl1(kw)
Definition value.h:432
@ MRBC_TT_HASH
Hash.
Definition value.h:100

Get keyword arguments and define mrbc_value with same name. Up to 30 arguments can be specified.

Definition at line 427 of file value.h.

◆ MRBC_KW_ARG_decl1

#define MRBC_KW_ARG_decl1 ( kw)
Value:
@ MRBC_TT_EMPTY
Definition value.h:80

Definition at line 432 of file value.h.

◆ MRBC_KW_ARG_decl2

#define MRBC_KW_ARG_decl2 ( kw)
Value:
mrbc_value mrbc_hash_remove_by_id(mrbc_value *hash, mrbc_sym sym_id)
Definition c_hash.c:245
mrbc_sym mrbc_str_to_symid(const char *str)
Definition symbol.c:221

Definition at line 433 of file value.h.

◆ MRBC_KW_DELETE

#define MRBC_KW_DELETE ( ...)
Value:
MRBC_each(__VA_ARGS__)( MRBC_KW_DELETE_decl, __VA_ARGS__ )
#define MRBC_KW_DELETE_decl(kw)
Definition value.h:453

Delete retrieved keyword arguments.

Definition at line 451 of file value.h.

◆ MRBC_KW_DELETE_decl

#define MRBC_KW_DELETE_decl ( kw)
Value:
static void mrbc_decref(mrbc_value *v)
Definition value.h:561

Definition at line 453 of file value.h.

◆ MRBC_KW_DICT

#define MRBC_KW_DICT ( dict)
Value:
mrbc_value dict; \
if( mrbc_type(v[argc+1]) == MRBC_TT_HASH ) { dict = v[argc+1]; v[argc+1].tt = MRBC_TT_EMPTY; } \
else { dict = mrbc_hash_new(vm, 0); }
mrbc_value mrbc_hash_new(mrbc_vm *vm, int size)
Definition c_hash.c:78
mrbc_vtype tt
Definition boxing_no.h:20

Get remaining keyword arguments as hash.

Definition at line 435 of file value.h.

◆ MRBC_KW_END

#define MRBC_KW_END ( )
Value:
(((mrbc_type(v[argc+1]) == MRBC_TT_HASH) && mrbc_hash_size(&v[argc+1])) ? \
(mrbc_raise(vm, MRBC_CLASS(ArgumentError), "unknown keyword"), 0) : 1)
static int mrbc_hash_size(const mrbc_value *hash)
Definition c_hash.h:88
#define MRBC_CLASS(cls)
Definition class.h:55
void mrbc_raise(struct VM *vm, struct RClass *exc_cls, const char *msg)
Definition error.c:145

Check for excess keyword arguments. If excess keyword argument are given, return False(=0) and set ArgumentError.

Definition at line 447 of file value.h.

◆ MRBC_KW_ISVALID

#define MRBC_KW_ISVALID ( kw)
Value:

Check if argument is valid.

Definition at line 440 of file value.h.

◆ MRBC_KW_MANDATORY

#define MRBC_KW_MANDATORY ( ...)
Value:
(MRBC_each(__VA_ARGS__)( MRBC_KW_MANDATORY_decl1, __VA_ARGS__ ) 1)
#define MRBC_KW_MANDATORY_decl1(kw)
Definition value.h:444

Check if mandatory keyword arguments are given. If not, return False(=0) and set ArgumentError.

Definition at line 442 of file value.h.

◆ MRBC_KW_MANDATORY_decl1

#define MRBC_KW_MANDATORY_decl1 ( kw)
Value:
(MRBC_KW_ISVALID(kw)? 1 : \
(mrbc_raisef(vm, MRBC_CLASS(ArgumentError), "missing keyword: %s", #kw), 0))&&
void mrbc_raisef(struct VM *vm, struct RClass *exc_cls, const char *fstr,...)
Definition error.c:168
#define MRBC_KW_ISVALID(kw)
Definition value.h:440

Definition at line 444 of file value.h.

◆ MRBC_OBJECT_HEADER

#define MRBC_OBJECT_HEADER   uint16_t ref_count

Definition at line 145 of file value.h.

◆ MRBC_PTR_TO_UINT32

#define MRBC_PTR_TO_UINT32 ( p)
Value:
((uint32_t)(p))

convert pointer to uint32_t

Definition at line 504 of file value.h.

◆ MRBC_TO_F

#define MRBC_TO_F ( val)
Value:
mrbc_to_f(vm, v, argc, val)
mrbc_float_t mrbc_to_f(struct VM *vm, mrbc_value v[], int argc, mrbc_value *val)
Definition value.c:470

(beta) Convert mrbc_value to Float. and return C double value.

Definition at line 338 of file value.h.

◆ MRBC_TO_FLOAT

#define MRBC_TO_FLOAT ( val)
Value:
(val).tt == MRBC_TT_FLOAT ? (val).d : \
(val).tt == MRBC_TT_INTEGER ? (mrbc_float_t)(val).i : (mrbc_float_t)0
float mrbc_float_t
Definition value.h:52

Convert mrbc_value to C-lang double.

Definition at line 281 of file value.h.

◆ MRBC_TO_I

#define MRBC_TO_I ( val)
Value:
mrbc_to_i(vm, v, argc, val)
mrbc_int_t mrbc_to_i(struct VM *vm, mrbc_value v[], int argc, mrbc_value *val)
Definition value.c:429

(beta) Convert mrbc_value to Integer. and return C integer value.

Definition at line 337 of file value.h.

◆ MRBC_TO_INT

#define MRBC_TO_INT ( val)
Value:
(val).tt == MRBC_TT_INTEGER ? (val).i : \
(val).tt == MRBC_TT_FLOAT ? (mrbc_int_t)(val).d : 0
int32_t mrbc_int_t
Definition value.h:47

Convert mrbc_value to C-lang int.

Definition at line 278 of file value.h.

◆ MRBC_TO_S

#define MRBC_TO_S ( val)
Value:
mrbc_to_s(vm, v, argc, val)
char * mrbc_to_s(struct VM *vm, mrbc_value v[], int argc, mrbc_value *val)
Definition value.c:511

(beta) Convert mrbc_value to String. and return C const char *.

Definition at line 339 of file value.h.

◆ MRBC_TT_INC_DEC_THRESHOLD

#define MRBC_TT_INC_DEC_THRESHOLD   MRBC_TT_MODULE

Definition at line 103 of file value.h.

◆ MRBC_TT_MAXVAL

#define MRBC_TT_MAXVAL   MRBC_TT_EXCEPTION

Definition at line 104 of file value.h.

◆ MRBC_VAL_F

#define MRBC_VAL_F ( ...)
Value:
MRBC_arg_choice(__VA_ARGS__, mrbc_val_f2, mrbc_val_f) (vm, __VA_ARGS__)
double mrbc_val_f2(struct VM *vm, const mrbc_value *val, double default_value)
Definition value.c:363
double mrbc_val_f(struct VM *vm, const mrbc_value *val)
Definition value.c:332

(beta) get a C double value from mrbc_value.

Examples:

double d1 = MRBC_VAL_F( &val );
double d1 = MRBC_VAL_F( &val, 2.7 );
#define MRBC_VAL_F(...)
Definition value.h:321

Definition at line 321 of file value.h.

◆ MRBC_VAL_I

#define MRBC_VAL_I ( ...)
Value:
MRBC_arg_choice(__VA_ARGS__, mrbc_val_i2, mrbc_val_i) (vm, __VA_ARGS__)
mrbc_int_t mrbc_val_i(struct VM *vm, const mrbc_value *val)
Definition value.c:283
mrbc_int_t mrbc_val_i2(struct VM *vm, const mrbc_value *val, mrbc_int_t default_value)
Definition value.c:314

(beta) get a C integer value from mrbc_value.

Examples:

int i1 = MRBC_VAL_I( &val );
int i1 = MRBC_VAL_I( &val, 111 );
#define MRBC_VAL_I(...)
Definition value.h:320

Definition at line 320 of file value.h.

◆ MRBC_VAL_S

#define MRBC_VAL_S ( ...)
Value:
MRBC_arg_choice(__VA_ARGS__, mrbc_val_s2, mrbc_val_s) (vm, __VA_ARGS__)
const char * mrbc_val_s2(struct VM *vm, const mrbc_value *val, const char *default_value)
Definition value.c:409
const char * mrbc_val_s(struct VM *vm, const mrbc_value *val)
Definition value.c:381

(beta) get a const char * from mrbc_value.

Examples:

const char *s1 = MRBC_VAL_S( &val );
const char *s1 = MRBC_VAL_S( &val, "DEFAULT" );
#define MRBC_VAL_S(...)
Definition value.h:322

Definition at line 322 of file value.h.

◆ SET_BOOL_RETURN

#define SET_BOOL_RETURN ( n)
Value:
do { \
int nnn = (n); \
mrbc_decref(v); \
mrbc_set_bool(v,nnn); \
} while(0)

set a return value to true or false when writing a method by C.

Definition at line 238 of file value.h.

◆ SET_FALSE_RETURN

#define SET_FALSE_RETURN ( )
Value:
do { \
mrbc_decref(v); \
mrbc_set_false(v); \
} while(0)

set a return value to false when writing a method by C.

Definition at line 230 of file value.h.

◆ SET_FLOAT_RETURN

#define SET_FLOAT_RETURN ( n)
Value:
do {\
mrbc_float_t nnn = (n); \
mrbc_decref(v); \
mrbc_set_float(v,nnn); \
} while(0)

set a float return value when writing a method by C.

Definition at line 248 of file value.h.

◆ SET_INT_RETURN

#define SET_INT_RETURN ( n)
Value:
do { \
mrbc_int_t nnn = (n); \
mrbc_decref(v); \
mrbc_set_integer(v,nnn); \
} while(0)

set an integer return value when writing a method by C.

Definition at line 243 of file value.h.

◆ SET_NIL_RETURN

#define SET_NIL_RETURN ( )
Value:
do { \
mrbc_decref(v); \
mrbc_set_nil(v); \
} while(0)

set a return value to nil when writing a method by C.

Definition at line 226 of file value.h.

◆ SET_RETURN

#define SET_RETURN ( n)
Value:
do { \
mrbc_value nnn = (n); \
mrbc_decref(v); \
v[0] = nnn; \
} while(0)

set a return value when writing a method by C.

Definition at line 221 of file value.h.

◆ SET_TRUE_RETURN

#define SET_TRUE_RETURN ( )
Value:
do { \
mrbc_decref(v); \
mrbc_set_true(v); \
} while(0)

set a return value to true when writing a method by C.

Definition at line 234 of file value.h.

Typedef Documentation

◆ mrbc_float_t

typedef float mrbc_float_t

Definition at line 52 of file value.h.

◆ mrbc_func_t

typedef void(* mrbc_func_t) (struct VM *vm, struct RObject *v, int argc)

Definition at line 63 of file value.h.

◆ mrbc_int_t

typedef int32_t mrbc_int_t

Definition at line 47 of file value.h.

◆ mrbc_object

typedef struct RObject mrbc_object

Definition at line 166 of file value.h.

◆ mrbc_sym

typedef int16_t mrbc_sym

mruby/c symbol ID

Definition at line 62 of file value.h.

◆ mrbc_uint_t

typedef uint32_t mrbc_uint_t

Definition at line 48 of file value.h.

Enumeration Type Documentation

◆ mrbc_error_code

error code for internal use. (BETA TEST)

Enumerator
E_NOMEMORY_ERROR 
E_RUNTIME_ERROR 
E_TYPE_ERROR 
E_ARGUMENT_ERROR 
E_INDEX_ERROR 
E_RANGE_ERROR 
E_NAME_ERROR 
E_NOMETHOD_ERROR 
E_SCRIPT_ERROR 
E_SYNTAX_ERROR 
E_LOCALJUMP_ERROR 
E_REGEXP_ERROR 
E_NOTIMP_ERROR 
E_FLOATDOMAIN_ERROR 
E_KEY_ERROR 
E_BYTECODE_ERROR 

Definition at line 110 of file value.h.

◆ mrbc_vtype

enum mrbc_vtype

value type in mrbc_value.

Enumerator
MRBC_TT_JMPUW 
MRBC_TT_BREAK 
MRBC_TT_RETURN_BLK 
MRBC_TT_RETURN 
MRBC_TT_HANDLE 
MRBC_TT_EMPTY 
MRBC_TT_NIL 

NilClass.

MRBC_TT_FALSE 

FalseClass.

MRBC_TT_TRUE 

TrueClass.

MRBC_TT_INTEGER 

Integer.

MRBC_TT_FIXNUM 
MRBC_TT_FLOAT 

Float.

MRBC_TT_SYMBOL 

Symbol.

MRBC_TT_CLASS 

Class.

MRBC_TT_MODULE 

Module.

MRBC_TT_OBJECT 

General instance.

MRBC_TT_PROC 

Proc.

MRBC_TT_ARRAY 

Array.

MRBC_TT_STRING 

String.

MRBC_TT_RANGE 

Range.

MRBC_TT_HASH 

Hash.

MRBC_TT_EXCEPTION 

Exception.

Definition at line 69 of file value.h.

Function Documentation

◆ bin_to_double64()

double bin_to_double64 ( const void * s)
inlinestatic

Get double (64bit) value from memory.

Parameters
sPointer to memory.
Returns
double value.

Definition at line 721 of file value.h.

Here is the caller graph for this function:

◆ bin_to_uint16()

uint16_t bin_to_uint16 ( const void * s)
inlinestatic

Get 16bit int value from memory.

Parameters
sPointer to memory.
Returns
16bit unsigned int value.

Definition at line 603 of file value.h.

Here is the caller graph for this function:

◆ bin_to_uint32()

uint32_t bin_to_uint32 ( const void * s)
inlinestatic

Get 32bit int value from memory.

Parameters
sPointer to memory.
Returns
32bit unsigned int value.

Definition at line 635 of file value.h.

Here is the caller graph for this function:

◆ mrbc_decref()

void mrbc_decref ( mrbc_value * v)
inlinestatic

Decrement reference counter

Parameters
vPointer to target mrbc_value

Definition at line 561 of file value.h.

◆ mrbc_decref_empty()

void mrbc_decref_empty ( mrbc_value * v)
inlinestatic

Decrement reference counter with set TT_EMPTY.

Parameters
vPointer to target mrbc_value

Definition at line 579 of file value.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mrbc_delete()

void mrbc_delete ( mrbc_value * v)
inlinestatic

delete value but same as mrbc_decref() function.

Parameters
vPointer to target mrbc_value

Definition at line 591 of file value.h.

Here is the call graph for this function:

◆ mrbc_incref()

void mrbc_incref ( mrbc_value * v)
inlinestatic

Increment reference counter

Parameters
vPointer to mrbc_value

Definition at line 546 of file value.h.

Here is the caller graph for this function:

◆ uint16_to_bin()

void uint16_to_bin ( uint16_t v,
void * d )
inlinestatic

Set 16bit value to memory.

Parameters
vSource value.
dPointer to memory.

Definition at line 789 of file value.h.

◆ uint32_to_bin()

void uint32_to_bin ( uint32_t v,
void * d )
inlinestatic

Set 32bit value to memory.

Parameters
vSource value.
dPointer to memory.

Definition at line 770 of file value.h.

Variable Documentation

◆ mrbc_delfunc

void(*const mrbc_delfunc[])(mrbc_value *) ( mrbc_value * )
extern

function table for object delete.

Note
must be same order as mrbc_vtype.
See also
mrbc_vtype in value.h

Definition at line 39 of file value.c.