1 /*
2 ** Lua binding: common_a
3 */
4 
5 #include "tolua.h"
6 
7 #ifndef __cplusplus
8 #include <stdlib.h>
9 #endif
10 #ifdef __cplusplus
11  extern "C" int tolua_bnd_takeownership (lua_State* L); // from tolua_map.c
12 #else
13  int tolua_bnd_takeownership (lua_State* L); /* from tolua_map.c */
14 #endif
15 #include <string.h>
16 
17 /* Exported function */
18 TOLUA_API int tolua_common_a_open (lua_State* tolua_S);
19 LUALIB_API int luaopen_common_a (lua_State* tolua_S);
20 
21 #ifdef HAVE_CONFIG_H
22 #include <fc_config.h>
23 #endif
24 #include "api_common_intl.h"
25 #include "api_common_utilities.h"
26 #include "luascript.h"
27 #include "luascript_types.h"
28 
29 /* function to register type */
tolua_reg_types(lua_State * tolua_S)30 static void tolua_reg_types (lua_State* tolua_S)
31 {
32  tolua_usertype(tolua_S,"Nonexistent");
33 }
34 
35 /* function: api_intl__ */
tolua_common_a__00(lua_State * tolua_S)36 static int tolua_common_a__00(lua_State* tolua_S)
37 {
38 #ifndef TOLUA_RELEASE
39  tolua_Error tolua_err;
40  if (
41  !tolua_isstring(tolua_S,1,0,&tolua_err) ||
42  !tolua_isnoobj(tolua_S,2,&tolua_err)
43  )
44  goto tolua_lerror;
45  else
46 #endif
47  {
48   lua_State* L =  tolua_S;
49   const char* untranslated = ((const char*)  tolua_tostring(tolua_S,1,0));
50  {
51   const char* tolua_ret = (const char*)  api_intl__(L,untranslated);
52  tolua_pushstring(tolua_S,(const char*)tolua_ret);
53  }
54  }
55  return 1;
56 #ifndef TOLUA_RELEASE
57  tolua_lerror:
58  tolua_error(tolua_S,"#ferror in function '_'.",&tolua_err);
59  return 0;
60 #endif
61 }
62 
63 /* function: api_intl_N_ */
tolua_common_a_N_00(lua_State * tolua_S)64 static int tolua_common_a_N_00(lua_State* tolua_S)
65 {
66 #ifndef TOLUA_RELEASE
67  tolua_Error tolua_err;
68  if (
69  !tolua_isstring(tolua_S,1,0,&tolua_err) ||
70  !tolua_isnoobj(tolua_S,2,&tolua_err)
71  )
72  goto tolua_lerror;
73  else
74 #endif
75  {
76   lua_State* L =  tolua_S;
77   const char* untranslated = ((const char*)  tolua_tostring(tolua_S,1,0));
78  {
79   const char* tolua_ret = (const char*)  api_intl_N_(L,untranslated);
80  tolua_pushstring(tolua_S,(const char*)tolua_ret);
81  }
82  }
83  return 1;
84 #ifndef TOLUA_RELEASE
85  tolua_lerror:
86  tolua_error(tolua_S,"#ferror in function 'N_'.",&tolua_err);
87  return 0;
88 #endif
89 }
90 
91 /* function: api_intl_Q_ */
tolua_common_a_Q_00(lua_State * tolua_S)92 static int tolua_common_a_Q_00(lua_State* tolua_S)
93 {
94 #ifndef TOLUA_RELEASE
95  tolua_Error tolua_err;
96  if (
97  !tolua_isstring(tolua_S,1,0,&tolua_err) ||
98  !tolua_isnoobj(tolua_S,2,&tolua_err)
99  )
100  goto tolua_lerror;
101  else
102 #endif
103  {
104   lua_State* L =  tolua_S;
105   const char* untranslated = ((const char*)  tolua_tostring(tolua_S,1,0));
106  {
107   const char* tolua_ret = (const char*)  api_intl_Q_(L,untranslated);
108  tolua_pushstring(tolua_S,(const char*)tolua_ret);
109  }
110  }
111  return 1;
112 #ifndef TOLUA_RELEASE
113  tolua_lerror:
114  tolua_error(tolua_S,"#ferror in function 'Q_'.",&tolua_err);
115  return 0;
116 #endif
117 }
118 
119 /* function: api_intl_PL_ */
tolua_common_a_PL_00(lua_State * tolua_S)120 static int tolua_common_a_PL_00(lua_State* tolua_S)
121 {
122 #ifndef TOLUA_RELEASE
123  tolua_Error tolua_err;
124  if (
125  !tolua_isstring(tolua_S,1,0,&tolua_err) ||
126  !tolua_isstring(tolua_S,2,0,&tolua_err) ||
127  !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
128  !tolua_isnoobj(tolua_S,4,&tolua_err)
129  )
130  goto tolua_lerror;
131  else
132 #endif
133  {
134   lua_State* L =  tolua_S;
135   const char* singular = ((const char*)  tolua_tostring(tolua_S,1,0));
136   const char* plural = ((const char*)  tolua_tostring(tolua_S,2,0));
137   int n = ((int)  tolua_tonumber(tolua_S,3,0));
138  {
139   const char* tolua_ret = (const char*)  api_intl_PL_(L,singular,plural,n);
140  tolua_pushstring(tolua_S,(const char*)tolua_ret);
141  }
142  }
143  return 1;
144 #ifndef TOLUA_RELEASE
145  tolua_lerror:
146  tolua_error(tolua_S,"#ferror in function 'PL_'.",&tolua_err);
147  return 0;
148 #endif
149 }
150 
151 /* function: api_utilities_log_base */
tolua_common_a_log_base00(lua_State * tolua_S)152 static int tolua_common_a_log_base00(lua_State* tolua_S)
153 {
154 #ifndef TOLUA_RELEASE
155  tolua_Error tolua_err;
156  if (
157  !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
158  !tolua_isstring(tolua_S,2,0,&tolua_err) ||
159  !tolua_isnoobj(tolua_S,3,&tolua_err)
160  )
161  goto tolua_lerror;
162  else
163 #endif
164  {
165   lua_State* L =  tolua_S;
166   int log_level = ((int)  tolua_tonumber(tolua_S,1,0));
167   const char* message = ((const char*)  tolua_tostring(tolua_S,2,0));
168  {
169   api_utilities_log_base(L,log_level,message);
170  }
171  }
172  return 0;
173 #ifndef TOLUA_RELEASE
174  tolua_lerror:
175  tolua_error(tolua_S,"#ferror in function 'base'.",&tolua_err);
176  return 0;
177 #endif
178 }
179 
180 /* function: api_utilities_deprecation_warning */
tolua_common_a_log_deprecation_warning00(lua_State * tolua_S)181 static int tolua_common_a_log_deprecation_warning00(lua_State* tolua_S)
182 {
183 #ifndef TOLUA_RELEASE
184  tolua_Error tolua_err;
185  if (
186  !tolua_isstring(tolua_S,1,0,&tolua_err) ||
187  !tolua_isstring(tolua_S,2,0,&tolua_err) ||
188  !tolua_isstring(tolua_S,3,0,&tolua_err) ||
189  !tolua_isnoobj(tolua_S,4,&tolua_err)
190  )
191  goto tolua_lerror;
192  else
193 #endif
194  {
195   lua_State* L =  tolua_S;
196   char* method = ((char*)  tolua_tostring(tolua_S,1,0));
197   char* replacement = ((char*)  tolua_tostring(tolua_S,2,0));
198   char* deprecated_since = ((char*)  tolua_tostring(tolua_S,3,0));
199  {
200   api_utilities_deprecation_warning(L,method,replacement,deprecated_since);
201  }
202  }
203  return 0;
204 #ifndef TOLUA_RELEASE
205  tolua_lerror:
206  tolua_error(tolua_S,"#ferror in function 'deprecation_warning'.",&tolua_err);
207  return 0;
208 #endif
209 }
210 
211 /* function: api_utilities_random */
tolua_common_a_random00(lua_State * tolua_S)212 static int tolua_common_a_random00(lua_State* tolua_S)
213 {
214 #ifndef TOLUA_RELEASE
215  tolua_Error tolua_err;
216  if (
217  !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
218  !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
219  !tolua_isnoobj(tolua_S,3,&tolua_err)
220  )
221  goto tolua_lerror;
222  else
223 #endif
224  {
225   lua_State* L =  tolua_S;
226   int min = ((int)  tolua_tonumber(tolua_S,1,0));
227   int max = ((int)  tolua_tonumber(tolua_S,2,0));
228  {
229   int tolua_ret = (int)  api_utilities_random(L,min,max);
230  tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
231  }
232  }
233  return 1;
234 #ifndef TOLUA_RELEASE
235  tolua_lerror:
236  tolua_error(tolua_S,"#ferror in function 'random'.",&tolua_err);
237  return 0;
238 #endif
239 }
240 
241 /* function: api_utilities_fc_version */
tolua_common_a_fc_version00(lua_State * tolua_S)242 static int tolua_common_a_fc_version00(lua_State* tolua_S)
243 {
244 #ifndef TOLUA_RELEASE
245  tolua_Error tolua_err;
246  if (
247  !tolua_isnoobj(tolua_S,1,&tolua_err)
248  )
249  goto tolua_lerror;
250  else
251 #endif
252  {
253   lua_State* L =  tolua_S;
254  {
255   const char* tolua_ret = (const char*)  api_utilities_fc_version(L);
256  tolua_pushstring(tolua_S,(const char*)tolua_ret);
257  }
258  }
259  return 1;
260 #ifndef TOLUA_RELEASE
261  tolua_lerror:
262  tolua_error(tolua_S,"#ferror in function 'fc_version'.",&tolua_err);
263  return 0;
264 #endif
265 }
266 
267 /* Open lib function */
luaopen_common_a(lua_State * tolua_S)268 LUALIB_API int luaopen_common_a (lua_State* tolua_S)
269 {
270  tolua_open(tolua_S);
271  tolua_reg_types(tolua_S);
272  tolua_module(tolua_S,NULL,0);
273  tolua_beginmodule(tolua_S,NULL);
274  tolua_cclass(tolua_S,"Nonexistent","Nonexistent","",NULL);
275  tolua_beginmodule(tolua_S,"Nonexistent");
276  tolua_endmodule(tolua_S);
277 
278  { /* begin embedded lua code */
279  static unsigned char B[] = {
280   10,102,117,110, 99,116,105,111,110, 32, 78,111,110,101,120,
281  105,115,116,101,110,116, 58,101,120,105,115,116,115, 40, 41,
282   10,114,101,116,117,114,110, 32,102, 97,108,115,101, 10,101,
283  110,100,32
284  };
285  if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
286  lua_pcall(tolua_S,0,LUA_MULTRET,0);
287  } /* end of embedded lua code */
288 
289  tolua_function(tolua_S,"_",tolua_common_a__00);
290  tolua_function(tolua_S,"N_",tolua_common_a_N_00);
291  tolua_function(tolua_S,"Q_",tolua_common_a_Q_00);
292  tolua_function(tolua_S,"PL_",tolua_common_a_PL_00);
293  tolua_module(tolua_S,"log",0);
294  tolua_beginmodule(tolua_S,"log");
295  tolua_module(tolua_S,"level",0);
296  tolua_beginmodule(tolua_S,"level");
297  tolua_constant(tolua_S,"FATAL",LOG_FATAL);
298  tolua_constant(tolua_S,"ERROR",LOG_ERROR);
299  tolua_constant(tolua_S,"NORMAL",LOG_NORMAL);
300  tolua_constant(tolua_S,"VERBOSE",LOG_VERBOSE);
301  tolua_constant(tolua_S,"DEBUG",LOG_DEBUG);
302  tolua_endmodule(tolua_S);
303  tolua_function(tolua_S,"base",tolua_common_a_log_base00);
304  tolua_function(tolua_S,"deprecation_warning",tolua_common_a_log_deprecation_warning00);
305  tolua_endmodule(tolua_S);
306 
307  { /* begin embedded lua code */
308  static unsigned char B[] = {
309   10,102,117,110, 99,116,105,111,110, 32,108,111,103, 46,102,
310   97,116, 97,108, 40,102,109,116, 44, 32, 46, 46, 46, 41, 10,
311  108,111,103, 46, 98, 97,115,101, 40,108,111,103, 46,108,101,
312  118,101,108, 46, 70, 65, 84, 65, 76, 44, 32,115,116,114,105,
313  110,103, 46,102,111,114,109, 97,116, 40,102,109,116, 44, 32,
314   46, 46, 46, 41, 41, 10,101,110,100, 10,102,117,110, 99,116,
315  105,111,110, 32,108,111,103, 46,101,114,114,111,114, 40,102,
316  109,116, 44, 32, 46, 46, 46, 41, 10,108,111,103, 46, 98, 97,
317  115,101, 40,108,111,103, 46,108,101,118,101,108, 46, 69, 82,
318   82, 79, 82, 44, 32,115,116,114,105,110,103, 46,102,111,114,
319  109, 97,116, 40,102,109,116, 44, 32, 46, 46, 46, 41, 41, 10,
320  101,110,100, 10,102,117,110, 99,116,105,111,110, 32,108,111,
321  103, 46,110,111,114,109, 97,108, 40,102,109,116, 44, 32, 46,
322   46, 46, 41, 10,108,111,103, 46, 98, 97,115,101, 40,108,111,
323  103, 46,108,101,118,101,108, 46, 78, 79, 82, 77, 65, 76, 44,
324   32,115,116,114,105,110,103, 46,102,111,114,109, 97,116, 40,
325  102,109,116, 44, 32, 46, 46, 46, 41, 41, 10,101,110,100, 10,
326  102,117,110, 99,116,105,111,110, 32,108,111,103, 46,118,101,
327  114, 98,111,115,101, 40,102,109,116, 44, 32, 46, 46, 46, 41,
328   10,108,111,103, 46, 98, 97,115,101, 40,108,111,103, 46,108,
329  101,118,101,108, 46, 86, 69, 82, 66, 79, 83, 69, 44, 32,115,
330  116,114,105,110,103, 46,102,111,114,109, 97,116, 40,102,109,
331  116, 44, 32, 46, 46, 46, 41, 41, 10,101,110,100, 10,102,117,
332  110, 99,116,105,111,110, 32,108,111,103, 46,100,101, 98,117,
333  103, 40,102,109,116, 44, 32, 46, 46, 46, 41, 10,108,111,103,
334   46, 98, 97,115,101, 40,108,111,103, 46,108,101,118,101,108,
335   46, 68, 69, 66, 85, 71, 44, 32,115,116,114,105,110,103, 46,
336  102,111,114,109, 97,116, 40,102,109,116, 44, 32, 46, 46, 46,
337   41, 41, 10,101,110,100, 10,102,117,110, 99,116,105,111,110,
338   32,101,114,114,111,114, 95,108,111,103, 40,109,115,103, 41,
339   10,108,111,103, 46,101,114,114,111,114, 40,109,115,103, 41,
340   10,101,110,100, 10,102,117,110, 99,116,105,111,110, 32,100,
341  101, 98,117,103, 95,108,111,103, 40,109,115,103, 41, 10,108,
342  111,103, 46,100,101, 98,117,103, 40,109,115,103, 41, 10,101,
343  110,100,32
344  };
345  if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
346  lua_pcall(tolua_S,0,LUA_MULTRET,0);
347  } /* end of embedded lua code */
348 
349  tolua_function(tolua_S,"random",tolua_common_a_random00);
350  tolua_function(tolua_S,"fc_version",tolua_common_a_fc_version00);
351 
352  { /* begin embedded lua code */
353  static unsigned char B[] = {
354   10,102,117,110, 99,116,105,111,110, 32, 95,102,114,101,101,
355   99,105,118, 95,115,116, 97,116,101, 95,100,117,109,112, 40,
356   41, 10,108,111, 99, 97,108, 32,114,101,115, 32, 61, 32, 39,
357   39, 10,102,111,114, 32,107, 44, 32,118, 32,105,110, 32,112,
358   97,105,114,115, 40, 95, 71, 41, 32,100,111, 10,105,102, 32,
359  107, 32, 61, 61, 32, 39, 95, 86, 69, 82, 83, 73, 79, 78, 39,
360   32,116,104,101,110, 10,101,108,115,101,105,102, 32,116,121,
361  112,101, 40,118, 41, 32, 61, 61, 32, 39, 98,111,111,108,101,
362   97,110, 39, 10,111,114, 32,116,121,112,101, 40,118, 41, 32,
363   61, 61, 32, 39,110,117,109, 98,101,114, 39, 32,116,104,101,
364  110, 10,108,111, 99, 97,108, 32,114,118, 97,108,117,101, 32,
365   61, 32,116,111,115,116,114,105,110,103, 40,118, 41, 10,114,
366  101,115, 32, 61, 32,114,101,115, 32, 46, 46, 32,107, 32, 46,
367   46, 32, 39, 61, 39, 32, 46, 46, 32,114,118, 97,108,117,101,
368   32, 46, 46, 32, 39, 92,110, 39, 10,101,108,115,101,105,102,
369   32,116,121,112,101, 40,118, 41, 32, 61, 61, 32, 39,115,116,
370  114,105,110,103, 39, 32,116,104,101,110, 10,108,111, 99, 97,
371  108, 32,114,118, 97,108,117,101, 32, 61, 32,115,116,114,105,
372  110,103, 46,102,111,114,109, 97,116, 40, 39, 37,113, 39, 44,
373   32,118, 41, 10,114,101,115, 32, 61, 32,114,101,115, 32, 46,
374   46, 32,107, 32, 46, 46, 32, 39, 61, 39, 32, 46, 46, 32,114,
375  118, 97,108,117,101, 32, 46, 46, 32, 39, 92,110, 39, 10,101,
376  108,115,101,105,102, 32,116,121,112,101, 40,118, 41, 32, 61,
377   61, 32, 39,117,115,101,114,100, 97,116, 97, 39, 32,116,104,
378  101,110, 10,108,111, 99, 97,108, 32,109,101,116,104,111,100,
379   32, 61, 32,115,116,114,105,110,103, 46,108,111,119,101,114,
380   40,116,111,108,117, 97, 46,116,121,112,101, 40,118, 41, 41,
381   10,114,101,115, 32, 61, 32,114,101,115, 32, 46, 46, 32,107,
382   32, 46, 46, 32, 39, 61,102,105,110,100, 46, 39, 32, 46, 46,
383   32,109,101,116,104,111,100, 10,105,102, 32,109,101,116,104,
384  111,100, 32, 61, 61, 32, 39, 99,105,116,121, 39, 32,111,114,
385   32,109,101,116,104,111,100, 32, 61, 61, 32, 39,117,110,105,
386  116, 39, 32,116,104,101,110, 10,114,101,115, 32, 61, 32,114,
387  101,115, 32, 46, 46, 32, 39, 40,110,105,108, 44, 39, 32, 46,
388   46, 32,115,116,114,105,110,103, 46,102,111,114,109, 97,116,
389   40, 34, 37,100, 34, 44, 32,118, 46,105,100, 41, 32, 46, 46,
390   32, 39, 41, 39, 10,101,108,115,101,105,102, 32,118, 46,105,
391  100, 32,116,104,101,110, 10,114,101,115, 32, 61, 32,114,101,
392  115, 32, 46, 46, 32, 39, 40, 39, 32, 46, 46, 32,115,116,114,
393  105,110,103, 46,102,111,114,109, 97,116, 40, 34, 37,100, 34,
394   44, 32,118, 46,105,100, 41, 32, 46, 46, 32, 39, 41, 39, 10,
395  101,108,115,101, 10,114,101,115, 32, 61, 32,114,101,115, 32,
396   46, 46, 32, 39, 40, 41, 39, 10,101,110,100, 10,114,101,115,
397   32, 61, 32,114,101,115, 32, 46, 46, 32, 39, 92,110, 39, 10,
398  101,110,100, 10,101,110,100, 10,114,101,116,117,114,110, 32,
399  114,101,115, 10,101,110,100, 10,102,117,110, 99,116,105,111,
400  110, 32,108,105,115,116,101,110,118, 40, 41, 10,108,111, 99,
401   97,108, 32,102,117,110, 99,116,105,111,110, 32, 95,108,105,
402  115,116,101,110,118, 95,108,111,111,112, 40,111,102,102,115,
403  101,116, 44, 32,100, 97,116, 97, 41, 10,108,111, 99, 97,108,
404   32,110, 97,109,101, 10,108,111, 99, 97,108, 32,118, 97,108,
405  117,101, 10,102,111,114, 32,110, 97,109,101, 44,118, 97,108,
406  117,101, 32,105,110, 32,112, 97,105,114,115, 40,100, 97,116,
407   97, 41, 32,100,111, 10,105,102, 32,110, 97,109,101, 32,126,
408   61, 32, 34,108,111, 97,100,101,100, 34, 32, 97,110,100, 32,
409  110, 97,109,101, 32,126, 61, 32, 34, 95, 71, 34, 32, 97,110,
410  100, 32,110, 97,109,101, 58,115,117, 98, 40, 48, 44, 50, 41,
411   32,126, 61, 32, 34, 95, 95, 34, 32,116,104,101,110, 10,108,
412  111,103, 46,110,111,114,109, 97,108, 40, 34, 37,115, 45, 32,
413   37,115, 58, 32, 37,115, 34, 44, 32,111,102,102,115,101,116,
414   44, 32,116,121,112,101, 40,118, 97,108,117,101, 41, 44, 32,
415  110, 97,109,101, 41, 10,105,102, 32,116,121,112,101, 40,118,
416   97,108,117,101, 41, 32, 61, 61, 32, 34,116, 97, 98,108,101,
417   34, 32,116,104,101,110, 10, 95,108,105,115,116,101,110,118,
418   95,108,111,111,112, 40,111,102,102,115,101,116, 32, 46, 46,
419   32, 34, 32, 34, 44, 32,118, 97,108,117,101, 41, 10,101,110,
420  100, 10,101,110,100, 10,101,110,100, 10,101,110,100, 10, 95,
421  108,105,115,116,101,110,118, 95,108,111,111,112, 40, 34, 34,
422   44, 32, 95, 71, 41, 10,101,110,100, 10, 99,111,110,115,116,
423   32, 61, 32,123,125, 10,108,111, 99, 97,108, 32,100, 97,116,
424   97, 32, 61, 32,123,125, 10, 99,111,110,115,116, 95,109,116,
425   32, 61, 32,123, 10, 95, 95,110,101,119,105,110,100,101,120,
426   32, 61, 32,102,117,110, 99,116,105,111,110, 40, 97, 44, 98,
427   44, 99, 41, 10,105,102, 32,100, 97,116, 97, 91, 98, 93, 32,
428   61, 61, 32,110,105,108, 32,116,104,101,110, 10,105,102, 32,
429  116,121,112,101, 40, 99, 41, 32, 61, 61, 32, 39,116, 97, 98,
430  108,101, 39, 32,116,104,101,110, 10,108,111, 99, 97,108, 32,
431  112,114,111,120,121, 32, 61, 32,123,125, 10,108,111, 99, 97,
432  108, 32,109,116, 32, 61, 32,123, 10, 95, 95,105,110,100,101,
433  120, 32, 61, 32, 99, 44, 10, 95, 95,110,101,119,105,110,100,
434  101,120, 32, 61, 32,102,117,110, 99,116,105,111,110, 32, 40,
435  116, 44,107, 44,118, 41, 10,108,111,103, 46,101,114,114,111,
436  114, 40, 91, 91, 34, 65,116,116,101,109,112,116, 32,116,111,
437   32,117,112,100, 97,116,101, 32,114,101, 97,100, 45,111,110,
438  108,121, 32,116, 97, 98,108,101, 32, 39, 37,115, 39, 32,105,
439  110,100,101,120, 32, 39, 37,115, 39, 32, 34, 10, 34,119,105,
440  116,104, 32, 39, 37,115, 39, 46, 34, 93, 93, 44, 32, 98, 44,
441   32,116,111,115,116,114,105,110,103, 40,107, 41, 44, 32,116,
442  111,115,116,114,105,110,103, 40,118, 41, 41, 10,101,110,100,
443   10,125, 10,115,101,116,109,101,116, 97,116, 97, 98,108,101,
444   40,112,114,111,120,121, 44, 32,109,116, 41, 10,100, 97,116,
445   97, 91, 98, 93, 32, 61, 32,112,114,111,120,121, 10,101,108,
446  115,101, 10,100, 97,116, 97, 91, 98, 93, 32, 61, 32, 99, 10,
447  101,110,100, 10,101,108,115,101, 10,108,111,103, 46,101,114,
448  114,111,114, 40, 34, 73,108,108,101,103, 97,108, 32, 97,115,
449  115,105,103,110,109,101,110,116, 32,116,111, 32, 99,111,110,
450  115,116, 97,110,116, 32, 39, 37,115, 39, 46, 34, 44, 32,116,
451  111,115,116,114,105,110,103, 40, 98, 41, 41, 10,101,110,100,
452   10,101,110,100, 44, 10, 95, 95,105,110,100,101,120, 32, 61,
453   32,102,117,110, 99,116,105,111,110, 40, 97, 44, 98, 41, 10,
454  114,101,116,117,114,110, 32,100, 97,116, 97, 91, 98, 93, 10,
455  101,110,100, 10,125, 10,115,101,116,109,101,116, 97,116, 97,
456   98,108,101, 40, 99,111,110,115,116, 44, 32, 99,111,110,115,
457  116, 95,109,116, 41,32
458  };
459  if (luaL_loadbuffer(tolua_S,(char*)B,sizeof(B),"tolua: embedded Lua code") == LUA_OK)
460  lua_pcall(tolua_S,0,LUA_MULTRET,0);
461  } /* end of embedded lua code */
462 
463  tolua_endmodule(tolua_S);
464  return 1;
465 }
466 /* Open tolua function */
tolua_common_a_open(lua_State * tolua_S)467 TOLUA_API int tolua_common_a_open (lua_State* tolua_S)
468 {
469  lua_pushcfunction(tolua_S, luaopen_common_a);
470  lua_pushstring(tolua_S, "common_a");
471  lua_call(tolua_S, 1, 0);
472  return 1;
473 }
474