FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mruby/include/mruby/array.h at master · ranmocy/mruby · GitHub
ranmocy
/
mruby
Public
forked from
mruby/mruby
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
mruby
/
include
/
mruby
/
array.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
48 lines (42 loc) · 1.82 KB
Breadcrumbs
mruby
/
include
/
mruby
/
array.h
Copy path
File metadata and controls
48 lines (42 loc) · 1.82 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
** array.h - Array class
**
** See Copyright Notice in mruby.h
*/
#ifndef
MRUBY_ARRAY_H
#define
MRUBY_ARRAY_H
struct
RArray
{
MRUBY_OBJECT_HEADER
;
size_t
len
;
size_t
capa
;
mrb_value
*
buf
;
};
#define
mrb_ary_ptr
(
v
) ((struct RArray*)((v).value.p))
#define
mrb_ary_value
(
p
) mrb_obj_value((void*)(p))
#define
RARRAY
(
v
) ((struct RArray*)((v).value.p))
#define
RARRAY_LEN
(
a
) (RARRAY(a)->len)
#define
RARRAY_PTR
(
a
) (RARRAY(a)->buf)
mrb_value
mrb_ary_new_capa
(
mrb_state
*
,
size_t
);
mrb_value
mrb_ary_new
(
mrb_state
*
mrb
);
mrb_value
mrb_ary_new_elts
(
mrb_state
*
mrb
,
long
n
,
const
mrb_value
*
elts
);
void
mrb_ary_concat
(
mrb_state
*
,
mrb_value
,
mrb_value
);
mrb_value
mrb_ary_splat
(
mrb_state
*
,
mrb_value
);
void
mrb_ary_push
(
mrb_state
*
,
mrb_value
,
mrb_value
);
mrb_value
mrb_ary_pop
(
mrb_state
*
mrb
,
mrb_value
ary
);
mrb_value
mrb_ary_new_from_values
(
mrb_state
*
mrb
,
mrb_value
*
vals
,
size_t
size
);
mrb_value
mrb_ary_aget
(
mrb_state
*
mrb
,
mrb_value
self
);
mrb_value
mrb_ary_ref
(
mrb_state
*
mrb
,
mrb_value
ary
,
mrb_int
n
);
void
mrb_ary_set
(
mrb_state
*
mrb
,
mrb_value
ary
,
mrb_int
n
,
mrb_value
val
);
int
mrb_ary_len
(
mrb_state
*
mrb
,
mrb_value
ary
);
mrb_value
mrb_ary_replace_m
(
mrb_state
*
mrb
,
mrb_value
self
);
void
mrb_ary_replace
(
mrb_state
*
mrb
,
struct
RArray
*
a
,
mrb_value
*
argv
,
size_t
len
);
mrb_value
mrb_check_array_type
(
mrb_state
*
mrb
,
mrb_value
self
);
mrb_value
mrb_ary_unshift
(
mrb_state
*
mrb
,
mrb_value
self
,
mrb_value
item
);
mrb_value
mrb_ary_new4
(
mrb_state
*
mrb
,
long
n
,
const
mrb_value
*
elts
);
mrb_value
mrb_assoc_new
(
mrb_state
*
mrb
,
mrb_value
car
,
mrb_value
cdr
);
mrb_value
mrb_ary_entry
(
mrb_value
ary
,
long
offset
);
void
mrb_mem_clear
(
mrb_value
*
mem
,
long
size
);
mrb_value
mrb_ary_tmp_new
(
mrb_state
*
mrb
,
long
capa
);
mrb_value
mrb_ary_sort
(
mrb_state
*
mrb
,
mrb_value
ary
);
mrb_value
mrb_ary_shift
(
mrb_state
*
mrb
,
mrb_value
self
);
#endif
/* MRUBY_ARRAY_H */
Back
|
FazBrowse Home
|
New Git URL