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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* If placed under the "mruby/examples/mrbgems/mruby-YOUR-bigint" directory,
* this file is available under the Creative Commons Zero License (CC0).
* Note that file is incomplete.
*
* TODO: If this file is copied and another implementation is written,
* remove this comment block from the copied file.
*/
/*
* The "mruby/internal.h" file should be placed after the other mruby header files.
*/
/*
* The "mruby/presym.h" file is placed at the end of the mruby header file.
*/
/*
* Define your own struct RBigint.
*
* - Object type must be MRB_TT_BIGINT.
* - If the structure is named RBigint, MRB_OBJ_ALLOC() can be used as is.
*/
;
/*
* Assert with mrb_static_assert_object_size() that the entire structure is within 6 words.
*/
;
/*
* The lower 16 bits of the object flags (`obj->flags`) can be used freely by the GEM author.
*/
/*
* Implement the functions declared in `#ifdef MRUBY_USE_BIGINT ... #endif` in the "mruby/internal.h" file.
*/
mrb_value
/*
* The implementation function continues...
*/