mruby/c value definitions More...
#include "mrubyc.h"Go to the source code of this file.
Functions | |
| int | mrbc_compare (const mrbc_value *v1, const mrbc_value *v2) |
| mrbc_int_t | mrbc_atoi (const char *s, int base) |
| int | mrbc_strcpy (char *dest, int destsize, const char *src) |
| mrbc_int_t | mrbc_val_i (struct VM *vm, const mrbc_value *val) |
| mrbc_int_t | mrbc_val_i2 (struct VM *vm, const mrbc_value *val, mrbc_int_t default_value) |
| double | mrbc_val_f (struct VM *vm, const mrbc_value *val) |
| double | mrbc_val_f2 (struct VM *vm, const mrbc_value *val, double default_value) |
| const char * | mrbc_val_s (struct VM *vm, const mrbc_value *val) |
| const char * | mrbc_val_s2 (struct VM *vm, const mrbc_value *val, const char *default_value) |
| mrbc_int_t | mrbc_to_i (struct VM *vm, mrbc_value v[], int argc, mrbc_value *val) |
| mrbc_float_t | mrbc_to_f (struct VM *vm, mrbc_value v[], int argc, mrbc_value *val) |
| char * | mrbc_to_s (struct VM *vm, mrbc_value v[], int argc, mrbc_value *val) |
| mrbc_value * | mrbc_arg (struct VM *vm, mrbc_value v[], int argc, int n) |
| mrbc_int_t | mrbc_arg_i (struct VM *vm, mrbc_value v[], int argc, int n) |
| mrbc_int_t | mrbc_arg_i2 (struct VM *vm, mrbc_value v[], int argc, int n, mrbc_int_t default_value) |
| mrbc_float_t | mrbc_arg_f (struct VM *vm, mrbc_value v[], int argc, int n) |
| mrbc_float_t | mrbc_arg_f2 (struct VM *vm, mrbc_value v[], int argc, int n, mrbc_float_t default_value) |
| const char * | mrbc_arg_s (struct VM *vm, mrbc_value v[], int argc, int n) |
| const char * | mrbc_arg_s2 (struct VM *vm, mrbc_value v[], int argc, int n, const char *default_value) |
| int | mrbc_arg_b (struct VM *vm, mrbc_value v[], int argc, int n) |
| int | mrbc_arg_b2 (struct VM *vm, mrbc_value v[], int argc, int n, int default_value) |
Variables | |
| void(*const | mrbc_delfunc [])(mrbc_value *) |
mruby/c value definitions
Copyright (C) 2015- Kyushu Institute of Technology. Copyright (C) 2015- Shimane IT Open-Innovation Center. This file is distributed under BSD 3-Clause License.
Definition in file value.c.
| mrbc_value * mrbc_arg | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| int | n ) |
(beta) Get a N'th argument pointer.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| n | target argument number. |
Definition at line 530 of file value.c.
| int mrbc_arg_b | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| int | n ) |
(beta) Get a True/False argument as a C integer.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| n | target argument number. |
Definition at line 722 of file value.c.
| int mrbc_arg_b2 | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| int | n, | ||
| int | default_value ) |
(beta) Get a True/False argument as a C integer with default value.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| n | target argument number. |
| default_value | default value. |
Definition at line 759 of file value.c.
| mrbc_float_t mrbc_arg_f | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| int | n ) |
(beta) Get a argument as a C float (double).
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| n | target argument number. |
Definition at line 611 of file value.c.
| mrbc_float_t mrbc_arg_f2 | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| int | n, | ||
| mrbc_float_t | default_value ) |
(beta) Get a argument as a C float (double) with default value.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| n | target argument number. |
| default_value | default value. |
Definition at line 648 of file value.c.
| mrbc_int_t mrbc_arg_i | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| int | n ) |
(beta) Get a argument as a C integer.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| n | target argument number. |
Definition at line 554 of file value.c.
| mrbc_int_t mrbc_arg_i2 | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| int | n, | ||
| mrbc_int_t | default_value ) |
(beta) Get a argument as a C integer with default value.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| n | target argument number. |
| default_value | default value. |
Definition at line 591 of file value.c.
| const char * mrbc_arg_s | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| int | n ) |
(beta) Get a argument as a C string.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| n | target argument number. |
Definition at line 668 of file value.c.
| const char * mrbc_arg_s2 | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| int | n, | ||
| const char * | default_value ) |
(beta) Get a argument as a C string with default value.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| n | target argument number. |
| default_value | default value. |
Definition at line 702 of file value.c.
| mrbc_int_t mrbc_atoi | ( | const char * | s, |
| int | base ) |
| int mrbc_compare | ( | const mrbc_value * | v1, |
| const mrbc_value * | v2 ) |
compare two mrbc_values
| v1 | Pointer to mrbc_value |
| v2 | Pointer to another mrbc_value |
| 0 | v1 == v2 |
| plus | v1 > v2 |
| minus | v1 < v2 |
Definition at line 66 of file value.c.
| int mrbc_strcpy | ( | char * | dest, |
| int | destsize, | ||
| const char * | src ) |
| mrbc_float_t mrbc_to_f | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| mrbc_value * | val ) |
(beta) Convert mrbc_value type to Float.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| val | target value. |
Definition at line 451 of file value.c.
| mrbc_int_t mrbc_to_i | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| mrbc_value * | val ) |
(beta) Convert mrbc_value type to Integer.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| val | target value. |
Definition at line 410 of file value.c.
| char * mrbc_to_s | ( | struct VM * | vm, |
| mrbc_value | v[], | ||
| int | argc, | ||
| mrbc_value * | val ) |
(beta) Convert mrbc_value type to String.
| vm | pointer to vm. |
| v | argument array. |
| argc | num of argument. |
| val | target value. |
Definition at line 492 of file value.c.
| double mrbc_val_f | ( | struct VM * | vm, |
| const mrbc_value * | val ) |
(beta) mrbc_value accessor for double type return value.
| vm | pointer to vm. |
| val | target value. |
Definition at line 313 of file value.c.
| double mrbc_val_f2 | ( | struct VM * | vm, |
| const mrbc_value * | val, | ||
| double | default_value ) |
(beta) mrbc_value accessor for double type return value. have a default value.
| vm | pointer to vm. |
| val | target value. |
| default_value | default value. |
Definition at line 344 of file value.c.
| mrbc_int_t mrbc_val_i | ( | struct VM * | vm, |
| const mrbc_value * | val ) |
(beta) mrbc_value accessor for int type return value.
| vm | pointer to vm. |
| val | target value. |
Definition at line 264 of file value.c.
| mrbc_int_t mrbc_val_i2 | ( | struct VM * | vm, |
| const mrbc_value * | val, | ||
| mrbc_int_t | default_value ) |
(beta) mrbc_value accessor for int type return value. have a default value.
| vm | pointer to vm. |
| val | target value. |
| default_value | default value. |
Definition at line 295 of file value.c.
| const char * mrbc_val_s | ( | struct VM * | vm, |
| const mrbc_value * | val ) |
(beta) mrbc_value accessor for const char * type return value.
| vm | pointer to vm. |
| val | target value. |
Definition at line 362 of file value.c.
| const char * mrbc_val_s2 | ( | struct VM * | vm, |
| const mrbc_value * | val, | ||
| const char * | default_value ) |
(beta) mrbc_value accessor for const char * type return value. have a default value.
| vm | pointer to vm. |
| val | target value. |
| default_value | default value. |
Definition at line 390 of file value.c.
| void(*const mrbc_delfunc[])(mrbc_value *) | ( | mrbc_value * | ) |
function table for object delete.