w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

disable.h
Go to the documentation of this file.
1 /**
2 ** @file mruby/presym/disable.h - Disable Preallocated Symbols
3 **
4 ** See Copyright Notice in mruby.h
5 */
6 
7 #ifndef MRUBY_PRESYM_DISABLE_H
8 #define MRUBY_PRESYM_DISABLE_H
9 
10 #include <string.h>
11 
12 #define MRB_PRESYM_MAX 0
13 
14 #define MRB_OPSYM(name) MRB_OPSYM__##name(mrb)
15 #define MRB_CVSYM(name) mrb_intern_lit(mrb, "@@" #name)
16 #define MRB_IVSYM(name) mrb_intern_lit(mrb, "@" #name)
17 #define MRB_SYM_B(name) mrb_intern_lit(mrb, #name "!")
18 #define MRB_SYM_Q(name) mrb_intern_lit(mrb, #name "?")
19 #define MRB_SYM_E(name) mrb_intern_lit(mrb, #name "=")
20 #define MRB_SYM(name) mrb_intern_lit(mrb, #name)
21 
22 #define MRB_OPSYM_2(mrb, name) MRB_OPSYM__##name(mrb)
23 #define MRB_CVSYM_2(mrb, name) mrb_intern_lit(mrb, "@@" #name)
24 #define MRB_IVSYM_2(mrb, name) mrb_intern_lit(mrb, "@" #name)
25 #define MRB_SYM_B_2(mrb, name) mrb_intern_lit(mrb, #name "!")
26 #define MRB_SYM_Q_2(mrb, name) mrb_intern_lit(mrb, #name "?")
27 #define MRB_SYM_E_2(mrb, name) mrb_intern_lit(mrb, #name "=")
28 #define MRB_SYM_2(mrb, name) mrb_intern_lit(mrb, #name)
29 
30 #define MRB_OPSYM__not(mrb) mrb_intern_lit(mrb, "!")
31 #define MRB_OPSYM__mod(mrb) mrb_intern_lit(mrb, "%")
32 #define MRB_OPSYM__and(mrb) mrb_intern_lit(mrb, "&")
33 #define MRB_OPSYM__mul(mrb) mrb_intern_lit(mrb, "*")
34 #define MRB_OPSYM__add(mrb) mrb_intern_lit(mrb, "+")
35 #define MRB_OPSYM__sub(mrb) mrb_intern_lit(mrb, "-")
36 #define MRB_OPSYM__div(mrb) mrb_intern_lit(mrb, "/")
37 #define MRB_OPSYM__lt(mrb) mrb_intern_lit(mrb, "<")
38 #define MRB_OPSYM__gt(mrb) mrb_intern_lit(mrb, ">")
39 #define MRB_OPSYM__xor(mrb) mrb_intern_lit(mrb, "^")
40 #define MRB_OPSYM__tick(mrb) mrb_intern_lit(mrb, "`")
41 #define MRB_OPSYM__or(mrb) mrb_intern_lit(mrb, "|")
42 #define MRB_OPSYM__neg(mrb) mrb_intern_lit(mrb, "~")
43 #define MRB_OPSYM__neq(mrb) mrb_intern_lit(mrb, "!=")
44 #define MRB_OPSYM__nmatch(mrb) mrb_intern_lit(mrb, "!~")
45 #define MRB_OPSYM__andand(mrb) mrb_intern_lit(mrb, "&&")
46 #define MRB_OPSYM__pow(mrb) mrb_intern_lit(mrb, "**")
47 #define MRB_OPSYM__plus(mrb) mrb_intern_lit(mrb, "+@")
48 #define MRB_OPSYM__minus(mrb) mrb_intern_lit(mrb, "-@")
49 #define MRB_OPSYM__lshift(mrb) mrb_intern_lit(mrb, "<<")
50 #define MRB_OPSYM__le(mrb) mrb_intern_lit(mrb, "<=")
51 #define MRB_OPSYM__eq(mrb) mrb_intern_lit(mrb, "==")
52 #define MRB_OPSYM__match(mrb) mrb_intern_lit(mrb, "=~")
53 #define MRB_OPSYM__ge(mrb) mrb_intern_lit(mrb, ">=")
54 #define MRB_OPSYM__rshift(mrb) mrb_intern_lit(mrb, ">>")
55 #define MRB_OPSYM__aref(mrb) mrb_intern_lit(mrb, "[]")
56 #define MRB_OPSYM__oror(mrb) mrb_intern_lit(mrb, "||")
57 #define MRB_OPSYM__cmp(mrb) mrb_intern_lit(mrb, "<=>")
58 #define MRB_OPSYM__eqq(mrb) mrb_intern_lit(mrb, "===")
59 #define MRB_OPSYM__aset(mrb) mrb_intern_lit(mrb, "[]=")
60 
61 #define MRB_PRESYM_DEFINE_VAR_AND_INITER(name, size, ...) \
62  static mrb_sym name[size]; \
63  static void presym_init_##name(mrb_state *mrb) { \
64  mrb_sym name__[] = {__VA_ARGS__}; \
65  memcpy(name, name__, sizeof(name)); \
66  }
67 
68 #define MRB_PRESYM_INIT_SYMBOLS(mrb, name) presym_init_##name(mrb)
69 
70 #endif /* MRUBY_PRESYM_DISABLE_H */