mruby/c VM Source Code release 3.4
Loading...
Searching...
No Matches
c_range.c File Reference

mruby/c Range class More...

#include "mrubyc.h"
#include "_autogen_class_range.h"
Include dependency graph for c_range.c:

Go to the source code of this file.

Functions

mrbc_value mrbc_range_new (struct VM *vm, mrbc_value *first, mrbc_value *last, int flag_exclude)
void mrbc_range_delete (mrbc_value *v)
int mrbc_range_compare (const mrbc_value *v1, const mrbc_value *v2)

Detailed Description

mruby/c Range class

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 c_range.c.

Function Documentation

◆ mrbc_range_compare()

int mrbc_range_compare ( const mrbc_value * v1,
const mrbc_value * v2 )

compare

Parameters
v1Pointer to target.
v2Pointer to another target.
Return values
0v1 == v2
plusv1 > v2
minusv1 < v2

Definition at line 97 of file c_range.c.

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

◆ mrbc_range_delete()

void mrbc_range_delete ( mrbc_value * v)

destructor

Parameters
vpointer to target.

Definition at line 64 of file c_range.c.

Here is the call graph for this function:

◆ mrbc_range_new()

mrbc_value mrbc_range_new ( struct VM * vm,
mrbc_value * first,
mrbc_value * last,
int flag_exclude )

constructor

Parameters
vmpointer to VM.
firstpointer to first value.
lastpointer to last value.
flag_excludetrue: exclude the end object, otherwise include.
Returns
range object.

Definition at line 43 of file c_range.c.

Here is the caller graph for this function: