Last change
on this file since 380 was 331, checked in by coas-nagasima, 6 years ago |
prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-chdr;charset=UTF-8
|
File size:
1.3 KB
|
Line | |
---|
1 | /*
|
---|
2 | ** mruby/range.h - Range class
|
---|
3 | **
|
---|
4 | ** See Copyright Notice in mruby.h
|
---|
5 | */
|
---|
6 |
|
---|
7 | #ifndef MRUBY_RANGE_H
|
---|
8 | #define MRUBY_RANGE_H
|
---|
9 |
|
---|
10 | #include "common.h"
|
---|
11 |
|
---|
12 | /**
|
---|
13 | * Range class
|
---|
14 | */
|
---|
15 | MRB_BEGIN_DECL
|
---|
16 |
|
---|
17 | typedef struct mrb_range_edges {
|
---|
18 | mrb_value beg;
|
---|
19 | mrb_value end;
|
---|
20 | } mrb_range_edges;
|
---|
21 |
|
---|
22 | struct RRange {
|
---|
23 | MRB_OBJECT_HEADER;
|
---|
24 | mrb_range_edges *edges;
|
---|
25 | mrb_bool excl : 1;
|
---|
26 | };
|
---|
27 |
|
---|
28 | MRB_API struct RRange* mrb_range_ptr(mrb_state *mrb, mrb_value v);
|
---|
29 | #define mrb_range_raw_ptr(v) ((struct RRange*)mrb_ptr(v))
|
---|
30 | #define mrb_range_value(p) mrb_obj_value((void*)(p))
|
---|
31 |
|
---|
32 | /*
|
---|
33 | * Initializes a Range.
|
---|
34 | *
|
---|
35 | * If the third parameter is FALSE then it includes the last value in the range.
|
---|
36 | * If the third parameter is TRUE then it excludes the last value in the range.
|
---|
37 | *
|
---|
38 | * @param start the beginning value.
|
---|
39 | * @param end the ending value.
|
---|
40 | * @param exclude represents the inclusion or exclusion of the last value.
|
---|
41 | */
|
---|
42 | MRB_API mrb_value mrb_range_new(mrb_state *mrb, mrb_value start, mrb_value end, mrb_bool exclude);
|
---|
43 |
|
---|
44 | MRB_API mrb_int mrb_range_beg_len(mrb_state *mrb, mrb_value range, mrb_int *begp, mrb_int *lenp, mrb_int len, mrb_bool trunc);
|
---|
45 | mrb_value mrb_get_values_at(mrb_state *mrb, mrb_value obj, mrb_int olen, mrb_int argc, const mrb_value *argv, mrb_value (*func)(mrb_state*, mrb_value, mrb_int));
|
---|
46 |
|
---|
47 | MRB_END_DECL
|
---|
48 |
|
---|
49 | #endif /* MRUBY_RANGE_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.