/
rbxti-internal.hpp
92 lines (71 loc) · 1.83 KB
/
rbxti-internal.hpp
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#ifndef RBX_INSTRUMENTS_RBXTI_INTERNALS_HPP
#define RBX_INSTRUMENTS_RBXTI_INTERNALS_HPP
#include "capi/18/include/rbxti.hpp"
namespace rubinius {
class VM;
class Module;
class Symbol;
class CompiledCode;
class MachineCode;
class String;
class Integer;
class LookupTable;
class Array;
class Object;
}
namespace rbxti {
Env* create_env(rubinius::VM*);
void destroy_env(Env*);
static inline rubinius::Module* i(rmodule mod) {
return (rubinius::Module*)mod;
}
static inline rubinius::Symbol* i(rsymbol sym) {
return (rubinius::Symbol*)sym;
}
static inline rubinius::CompiledCode* i(rmethod m) {
return (rubinius::CompiledCode*)m;
}
static inline rubinius::String* i(rstring s) {
return (rubinius::String*)s;
}
static inline rubinius::Integer* i(rinteger i) {
return (rubinius::Integer*)i;
}
static inline rubinius::LookupTable* i(rtable i) {
return (rubinius::LookupTable*)i;
}
static inline rubinius::Array* i(rarray a) {
return (rubinius::Array*)a;
}
static inline rmodule o(rubinius::Module* mod) {
return (rmodule)mod;
}
static inline rsymbol o(rubinius::Symbol* sym) {
return (rsymbol)sym;
}
static inline rmethod o(rubinius::CompiledCode* m) {
return (rmethod)m;
}
static inline rmachine_code o(rubinius::MachineCode* mcode) {
return (rmachine_code)mcode;
}
static inline rstring o(rubinius::String* s) {
return (rstring)s;
}
static inline rinteger o(rubinius::Integer* i) {
return (rinteger)i;
}
static inline rtable o(rubinius::LookupTable* i) {
return (rtable)i;
}
static inline rarray o(rubinius::Array* a) {
return (rarray)a;
}
static inline robject s(rubinius::Object* obj) {
return (robject)obj;
}
static inline rubinius::Object* s(robject obj) {
return (rubinius::Object*)obj;
}
}
#endif