lua/lua.h
author Ryan C. Gordon <icculus@icculus.org>
Sun, 18 Jun 2017 19:50:43 -0400
changeset 57 4974e5368a29
parent 0 d7ee4e2ed49d
permissions -rw-r--r--
Minor type cleanup ("unsigned char" -> "uint8_t").
icculus@0
     1
/*
icculus@0
     2
** $Id: lua.h,v 1.285.1.2 2013/11/11 12:09:16 roberto Exp $
icculus@0
     3
** Lua - A Scripting Language
icculus@0
     4
** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
icculus@0
     5
** See Copyright Notice at the end of this file
icculus@0
     6
*/
icculus@0
     7
icculus@0
     8
icculus@0
     9
#ifndef lua_h
icculus@0
    10
#define lua_h
icculus@0
    11
icculus@0
    12
#include <stdarg.h>
icculus@0
    13
#include <stddef.h>
icculus@0
    14
icculus@0
    15
icculus@0
    16
#include "luaconf.h"
icculus@0
    17
icculus@0
    18
icculus@0
    19
#define LUA_VERSION_MAJOR	"5"
icculus@0
    20
#define LUA_VERSION_MINOR	"2"
icculus@0
    21
#define LUA_VERSION_NUM		502
icculus@0
    22
#define LUA_VERSION_RELEASE	"3"
icculus@0
    23
icculus@0
    24
#define LUA_VERSION	"Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
icculus@0
    25
#define LUA_RELEASE	LUA_VERSION "." LUA_VERSION_RELEASE
icculus@0
    26
#define LUA_COPYRIGHT	LUA_RELEASE "  Copyright (C) 1994-2013 Lua.org, PUC-Rio"
icculus@0
    27
#define LUA_AUTHORS	"R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
icculus@0
    28
icculus@0
    29
icculus@0
    30
/* mark for precompiled code ('<esc>Lua') */
icculus@0
    31
#define LUA_SIGNATURE	"\033Lua"
icculus@0
    32
icculus@0
    33
/* option for multiple returns in 'lua_pcall' and 'lua_call' */
icculus@0
    34
#define LUA_MULTRET	(-1)
icculus@0
    35
icculus@0
    36
icculus@0
    37
/*
icculus@0
    38
** pseudo-indices
icculus@0
    39
*/
icculus@0
    40
#define LUA_REGISTRYINDEX	LUAI_FIRSTPSEUDOIDX
icculus@0
    41
#define lua_upvalueindex(i)	(LUA_REGISTRYINDEX - (i))
icculus@0
    42
icculus@0
    43
icculus@0
    44
/* thread status */
icculus@0
    45
#define LUA_OK		0
icculus@0
    46
#define LUA_YIELD	1
icculus@0
    47
#define LUA_ERRRUN	2
icculus@0
    48
#define LUA_ERRSYNTAX	3
icculus@0
    49
#define LUA_ERRMEM	4
icculus@0
    50
#define LUA_ERRGCMM	5
icculus@0
    51
#define LUA_ERRERR	6
icculus@0
    52
icculus@0
    53
icculus@0
    54
typedef struct lua_State lua_State;
icculus@0
    55
icculus@0
    56
typedef int (*lua_CFunction) (lua_State *L);
icculus@0
    57
icculus@0
    58
icculus@0
    59
/*
icculus@0
    60
** functions that read/write blocks when loading/dumping Lua chunks
icculus@0
    61
*/
icculus@0
    62
typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz);
icculus@0
    63
icculus@0
    64
typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud);
icculus@0
    65
icculus@0
    66
icculus@0
    67
/*
icculus@0
    68
** prototype for memory-allocation functions
icculus@0
    69
*/
icculus@0
    70
typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize);
icculus@0
    71
icculus@0
    72
icculus@0
    73
/*
icculus@0
    74
** basic types
icculus@0
    75
*/
icculus@0
    76
#define LUA_TNONE		(-1)
icculus@0
    77
icculus@0
    78
#define LUA_TNIL		0
icculus@0
    79
#define LUA_TBOOLEAN		1
icculus@0
    80
#define LUA_TLIGHTUSERDATA	2
icculus@0
    81
#define LUA_TNUMBER		3
icculus@0
    82
#define LUA_TSTRING		4
icculus@0
    83
#define LUA_TTABLE		5
icculus@0
    84
#define LUA_TFUNCTION		6
icculus@0
    85
#define LUA_TUSERDATA		7
icculus@0
    86
#define LUA_TTHREAD		8
icculus@0
    87
icculus@0
    88
#define LUA_NUMTAGS		9
icculus@0
    89
icculus@0
    90
icculus@0
    91
icculus@0
    92
/* minimum Lua stack available to a C function */
icculus@0
    93
#define LUA_MINSTACK	20
icculus@0
    94
icculus@0
    95
icculus@0
    96
/* predefined values in the registry */
icculus@0
    97
#define LUA_RIDX_MAINTHREAD	1
icculus@0
    98
#define LUA_RIDX_GLOBALS	2
icculus@0
    99
#define LUA_RIDX_LAST		LUA_RIDX_GLOBALS
icculus@0
   100
icculus@0
   101
icculus@0
   102
/* type of numbers in Lua */
icculus@0
   103
typedef LUA_NUMBER lua_Number;
icculus@0
   104
icculus@0
   105
icculus@0
   106
/* type for integer functions */
icculus@0
   107
typedef LUA_INTEGER lua_Integer;
icculus@0
   108
icculus@0
   109
/* unsigned integer type */
icculus@0
   110
typedef LUA_UNSIGNED lua_Unsigned;
icculus@0
   111
icculus@0
   112
icculus@0
   113
icculus@0
   114
/*
icculus@0
   115
** generic extra include file
icculus@0
   116
*/
icculus@0
   117
#if defined(LUA_USER_H)
icculus@0
   118
#include LUA_USER_H
icculus@0
   119
#endif
icculus@0
   120
icculus@0
   121
icculus@0
   122
/*
icculus@0
   123
** RCS ident string
icculus@0
   124
*/
icculus@0
   125
extern const char lua_ident[];
icculus@0
   126
icculus@0
   127
icculus@0
   128
/*
icculus@0
   129
** state manipulation
icculus@0
   130
*/
icculus@0
   131
LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud);
icculus@0
   132
LUA_API void       (lua_close) (lua_State *L);
icculus@0
   133
LUA_API lua_State *(lua_newthread) (lua_State *L);
icculus@0
   134
icculus@0
   135
LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf);
icculus@0
   136
icculus@0
   137
icculus@0
   138
LUA_API const lua_Number *(lua_version) (lua_State *L);
icculus@0
   139
icculus@0
   140
icculus@0
   141
/*
icculus@0
   142
** basic stack manipulation
icculus@0
   143
*/
icculus@0
   144
LUA_API int   (lua_absindex) (lua_State *L, int idx);
icculus@0
   145
LUA_API int   (lua_gettop) (lua_State *L);
icculus@0
   146
LUA_API void  (lua_settop) (lua_State *L, int idx);
icculus@0
   147
LUA_API void  (lua_pushvalue) (lua_State *L, int idx);
icculus@0
   148
LUA_API void  (lua_remove) (lua_State *L, int idx);
icculus@0
   149
LUA_API void  (lua_insert) (lua_State *L, int idx);
icculus@0
   150
LUA_API void  (lua_replace) (lua_State *L, int idx);
icculus@0
   151
LUA_API void  (lua_copy) (lua_State *L, int fromidx, int toidx);
icculus@0
   152
LUA_API int   (lua_checkstack) (lua_State *L, int sz);
icculus@0
   153
icculus@0
   154
LUA_API void  (lua_xmove) (lua_State *from, lua_State *to, int n);
icculus@0
   155
icculus@0
   156
icculus@0
   157
/*
icculus@0
   158
** access functions (stack -> C)
icculus@0
   159
*/
icculus@0
   160
icculus@0
   161
LUA_API int             (lua_isnumber) (lua_State *L, int idx);
icculus@0
   162
LUA_API int             (lua_isstring) (lua_State *L, int idx);
icculus@0
   163
LUA_API int             (lua_iscfunction) (lua_State *L, int idx);
icculus@0
   164
LUA_API int             (lua_isuserdata) (lua_State *L, int idx);
icculus@0
   165
LUA_API int             (lua_type) (lua_State *L, int idx);
icculus@0
   166
LUA_API const char     *(lua_typename) (lua_State *L, int tp);
icculus@0
   167
icculus@0
   168
LUA_API lua_Number      (lua_tonumberx) (lua_State *L, int idx, int *isnum);
icculus@0
   169
LUA_API lua_Integer     (lua_tointegerx) (lua_State *L, int idx, int *isnum);
icculus@0
   170
LUA_API lua_Unsigned    (lua_tounsignedx) (lua_State *L, int idx, int *isnum);
icculus@0
   171
LUA_API int             (lua_toboolean) (lua_State *L, int idx);
icculus@0
   172
LUA_API const char     *(lua_tolstring) (lua_State *L, int idx, size_t *len);
icculus@0
   173
LUA_API size_t          (lua_rawlen) (lua_State *L, int idx);
icculus@0
   174
LUA_API lua_CFunction   (lua_tocfunction) (lua_State *L, int idx);
icculus@0
   175
LUA_API void	       *(lua_touserdata) (lua_State *L, int idx);
icculus@0
   176
LUA_API lua_State      *(lua_tothread) (lua_State *L, int idx);
icculus@0
   177
LUA_API const void     *(lua_topointer) (lua_State *L, int idx);
icculus@0
   178
icculus@0
   179
icculus@0
   180
/*
icculus@0
   181
** Comparison and arithmetic functions
icculus@0
   182
*/
icculus@0
   183
icculus@0
   184
#define LUA_OPADD	0	/* ORDER TM */
icculus@0
   185
#define LUA_OPSUB	1
icculus@0
   186
#define LUA_OPMUL	2
icculus@0
   187
#define LUA_OPDIV	3
icculus@0
   188
#define LUA_OPMOD	4
icculus@0
   189
#define LUA_OPPOW	5
icculus@0
   190
#define LUA_OPUNM	6
icculus@0
   191
icculus@0
   192
LUA_API void  (lua_arith) (lua_State *L, int op);
icculus@0
   193
icculus@0
   194
#define LUA_OPEQ	0
icculus@0
   195
#define LUA_OPLT	1
icculus@0
   196
#define LUA_OPLE	2
icculus@0
   197
icculus@0
   198
LUA_API int   (lua_rawequal) (lua_State *L, int idx1, int idx2);
icculus@0
   199
LUA_API int   (lua_compare) (lua_State *L, int idx1, int idx2, int op);
icculus@0
   200
icculus@0
   201
icculus@0
   202
/*
icculus@0
   203
** push functions (C -> stack)
icculus@0
   204
*/
icculus@0
   205
LUA_API void        (lua_pushnil) (lua_State *L);
icculus@0
   206
LUA_API void        (lua_pushnumber) (lua_State *L, lua_Number n);
icculus@0
   207
LUA_API void        (lua_pushinteger) (lua_State *L, lua_Integer n);
icculus@0
   208
LUA_API void        (lua_pushunsigned) (lua_State *L, lua_Unsigned n);
icculus@0
   209
LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t l);
icculus@0
   210
LUA_API const char *(lua_pushstring) (lua_State *L, const char *s);
icculus@0
   211
LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt,
icculus@0
   212
                                                      va_list argp);
icculus@0
   213
LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...);
icculus@0
   214
LUA_API void  (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n);
icculus@0
   215
LUA_API void  (lua_pushboolean) (lua_State *L, int b);
icculus@0
   216
LUA_API void  (lua_pushlightuserdata) (lua_State *L, void *p);
icculus@0
   217
LUA_API int   (lua_pushthread) (lua_State *L);
icculus@0
   218
icculus@0
   219
icculus@0
   220
/*
icculus@0
   221
** get functions (Lua -> stack)
icculus@0
   222
*/
icculus@0
   223
LUA_API void  (lua_getglobal) (lua_State *L, const char *var);
icculus@0
   224
LUA_API void  (lua_gettable) (lua_State *L, int idx);
icculus@0
   225
LUA_API void  (lua_getfield) (lua_State *L, int idx, const char *k);
icculus@0
   226
LUA_API void  (lua_rawget) (lua_State *L, int idx);
icculus@0
   227
LUA_API void  (lua_rawgeti) (lua_State *L, int idx, int n);
icculus@0
   228
LUA_API void  (lua_rawgetp) (lua_State *L, int idx, const void *p);
icculus@0
   229
LUA_API void  (lua_createtable) (lua_State *L, int narr, int nrec);
icculus@0
   230
LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz);
icculus@0
   231
LUA_API int   (lua_getmetatable) (lua_State *L, int objindex);
icculus@0
   232
LUA_API void  (lua_getuservalue) (lua_State *L, int idx);
icculus@0
   233
icculus@0
   234
icculus@0
   235
/*
icculus@0
   236
** set functions (stack -> Lua)
icculus@0
   237
*/
icculus@0
   238
LUA_API void  (lua_setglobal) (lua_State *L, const char *var);
icculus@0
   239
LUA_API void  (lua_settable) (lua_State *L, int idx);
icculus@0
   240
LUA_API void  (lua_setfield) (lua_State *L, int idx, const char *k);
icculus@0
   241
LUA_API void  (lua_rawset) (lua_State *L, int idx);
icculus@0
   242
LUA_API void  (lua_rawseti) (lua_State *L, int idx, int n);
icculus@0
   243
LUA_API void  (lua_rawsetp) (lua_State *L, int idx, const void *p);
icculus@0
   244
LUA_API int   (lua_setmetatable) (lua_State *L, int objindex);
icculus@0
   245
LUA_API void  (lua_setuservalue) (lua_State *L, int idx);
icculus@0
   246
icculus@0
   247
icculus@0
   248
/*
icculus@0
   249
** 'load' and 'call' functions (load and run Lua code)
icculus@0
   250
*/
icculus@0
   251
LUA_API void  (lua_callk) (lua_State *L, int nargs, int nresults, int ctx,
icculus@0
   252
                           lua_CFunction k);
icculus@0
   253
#define lua_call(L,n,r)		lua_callk(L, (n), (r), 0, NULL)
icculus@0
   254
icculus@0
   255
LUA_API int   (lua_getctx) (lua_State *L, int *ctx);
icculus@0
   256
icculus@0
   257
LUA_API int   (lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc,
icculus@0
   258
                            int ctx, lua_CFunction k);
icculus@0
   259
#define lua_pcall(L,n,r,f)	lua_pcallk(L, (n), (r), (f), 0, NULL)
icculus@0
   260
icculus@0
   261
LUA_API int   (lua_load) (lua_State *L, lua_Reader reader, void *dt,
icculus@0
   262
                                        const char *chunkname,
icculus@0
   263
                                        const char *mode);
icculus@0
   264
icculus@0
   265
LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data);
icculus@0
   266
icculus@0
   267
icculus@0
   268
/*
icculus@0
   269
** coroutine functions
icculus@0
   270
*/
icculus@0
   271
LUA_API int  (lua_yieldk) (lua_State *L, int nresults, int ctx,
icculus@0
   272
                           lua_CFunction k);
icculus@0
   273
#define lua_yield(L,n)		lua_yieldk(L, (n), 0, NULL)
icculus@0
   274
LUA_API int  (lua_resume) (lua_State *L, lua_State *from, int narg);
icculus@0
   275
LUA_API int  (lua_status) (lua_State *L);
icculus@0
   276
icculus@0
   277
/*
icculus@0
   278
** garbage-collection function and options
icculus@0
   279
*/
icculus@0
   280
icculus@0
   281
#define LUA_GCSTOP		0
icculus@0
   282
#define LUA_GCRESTART		1
icculus@0
   283
#define LUA_GCCOLLECT		2
icculus@0
   284
#define LUA_GCCOUNT		3
icculus@0
   285
#define LUA_GCCOUNTB		4
icculus@0
   286
#define LUA_GCSTEP		5
icculus@0
   287
#define LUA_GCSETPAUSE		6
icculus@0
   288
#define LUA_GCSETSTEPMUL	7
icculus@0
   289
#define LUA_GCSETMAJORINC	8
icculus@0
   290
#define LUA_GCISRUNNING		9
icculus@0
   291
#define LUA_GCGEN		10
icculus@0
   292
#define LUA_GCINC		11
icculus@0
   293
icculus@0
   294
LUA_API int (lua_gc) (lua_State *L, int what, int data);
icculus@0
   295
icculus@0
   296
icculus@0
   297
/*
icculus@0
   298
** miscellaneous functions
icculus@0
   299
*/
icculus@0
   300
icculus@0
   301
LUA_API int   (lua_error) (lua_State *L);
icculus@0
   302
icculus@0
   303
LUA_API int   (lua_next) (lua_State *L, int idx);
icculus@0
   304
icculus@0
   305
LUA_API void  (lua_concat) (lua_State *L, int n);
icculus@0
   306
LUA_API void  (lua_len)    (lua_State *L, int idx);
icculus@0
   307
icculus@0
   308
LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);
icculus@0
   309
LUA_API void      (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
icculus@0
   310
icculus@0
   311
icculus@0
   312
icculus@0
   313
/*
icculus@0
   314
** ===============================================================
icculus@0
   315
** some useful macros
icculus@0
   316
** ===============================================================
icculus@0
   317
*/
icculus@0
   318
icculus@0
   319
#define lua_tonumber(L,i)	lua_tonumberx(L,i,NULL)
icculus@0
   320
#define lua_tointeger(L,i)	lua_tointegerx(L,i,NULL)
icculus@0
   321
#define lua_tounsigned(L,i)	lua_tounsignedx(L,i,NULL)
icculus@0
   322
icculus@0
   323
#define lua_pop(L,n)		lua_settop(L, -(n)-1)
icculus@0
   324
icculus@0
   325
#define lua_newtable(L)		lua_createtable(L, 0, 0)
icculus@0
   326
icculus@0
   327
#define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n)))
icculus@0
   328
icculus@0
   329
#define lua_pushcfunction(L,f)	lua_pushcclosure(L, (f), 0)
icculus@0
   330
icculus@0
   331
#define lua_isfunction(L,n)	(lua_type(L, (n)) == LUA_TFUNCTION)
icculus@0
   332
#define lua_istable(L,n)	(lua_type(L, (n)) == LUA_TTABLE)
icculus@0
   333
#define lua_islightuserdata(L,n)	(lua_type(L, (n)) == LUA_TLIGHTUSERDATA)
icculus@0
   334
#define lua_isnil(L,n)		(lua_type(L, (n)) == LUA_TNIL)
icculus@0
   335
#define lua_isboolean(L,n)	(lua_type(L, (n)) == LUA_TBOOLEAN)
icculus@0
   336
#define lua_isthread(L,n)	(lua_type(L, (n)) == LUA_TTHREAD)
icculus@0
   337
#define lua_isnone(L,n)		(lua_type(L, (n)) == LUA_TNONE)
icculus@0
   338
#define lua_isnoneornil(L, n)	(lua_type(L, (n)) <= 0)
icculus@0
   339
icculus@0
   340
#define lua_pushliteral(L, s)	\
icculus@0
   341
	lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1)
icculus@0
   342
icculus@0
   343
#define lua_pushglobaltable(L)  \
icculus@0
   344
	lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS)
icculus@0
   345
icculus@0
   346
#define lua_tostring(L,i)	lua_tolstring(L, (i), NULL)
icculus@0
   347
icculus@0
   348
icculus@0
   349
icculus@0
   350
/*
icculus@0
   351
** {======================================================================
icculus@0
   352
** Debug API
icculus@0
   353
** =======================================================================
icculus@0
   354
*/
icculus@0
   355
icculus@0
   356
icculus@0
   357
/*
icculus@0
   358
** Event codes
icculus@0
   359
*/
icculus@0
   360
#define LUA_HOOKCALL	0
icculus@0
   361
#define LUA_HOOKRET	1
icculus@0
   362
#define LUA_HOOKLINE	2
icculus@0
   363
#define LUA_HOOKCOUNT	3
icculus@0
   364
#define LUA_HOOKTAILCALL 4
icculus@0
   365
icculus@0
   366
icculus@0
   367
/*
icculus@0
   368
** Event masks
icculus@0
   369
*/
icculus@0
   370
#define LUA_MASKCALL	(1 << LUA_HOOKCALL)
icculus@0
   371
#define LUA_MASKRET	(1 << LUA_HOOKRET)
icculus@0
   372
#define LUA_MASKLINE	(1 << LUA_HOOKLINE)
icculus@0
   373
#define LUA_MASKCOUNT	(1 << LUA_HOOKCOUNT)
icculus@0
   374
icculus@0
   375
typedef struct lua_Debug lua_Debug;  /* activation record */
icculus@0
   376
icculus@0
   377
icculus@0
   378
/* Functions to be called by the debugger in specific events */
icculus@0
   379
typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
icculus@0
   380
icculus@0
   381
icculus@0
   382
LUA_API int (lua_getstack) (lua_State *L, int level, lua_Debug *ar);
icculus@0
   383
LUA_API int (lua_getinfo) (lua_State *L, const char *what, lua_Debug *ar);
icculus@0
   384
LUA_API const char *(lua_getlocal) (lua_State *L, const lua_Debug *ar, int n);
icculus@0
   385
LUA_API const char *(lua_setlocal) (lua_State *L, const lua_Debug *ar, int n);
icculus@0
   386
LUA_API const char *(lua_getupvalue) (lua_State *L, int funcindex, int n);
icculus@0
   387
LUA_API const char *(lua_setupvalue) (lua_State *L, int funcindex, int n);
icculus@0
   388
icculus@0
   389
LUA_API void *(lua_upvalueid) (lua_State *L, int fidx, int n);
icculus@0
   390
LUA_API void  (lua_upvaluejoin) (lua_State *L, int fidx1, int n1,
icculus@0
   391
                                               int fidx2, int n2);
icculus@0
   392
icculus@0
   393
LUA_API int (lua_sethook) (lua_State *L, lua_Hook func, int mask, int count);
icculus@0
   394
LUA_API lua_Hook (lua_gethook) (lua_State *L);
icculus@0
   395
LUA_API int (lua_gethookmask) (lua_State *L);
icculus@0
   396
LUA_API int (lua_gethookcount) (lua_State *L);
icculus@0
   397
icculus@0
   398
icculus@0
   399
struct lua_Debug {
icculus@0
   400
  int event;
icculus@0
   401
  const char *name;	/* (n) */
icculus@0
   402
  const char *namewhat;	/* (n) 'global', 'local', 'field', 'method' */
icculus@0
   403
  const char *what;	/* (S) 'Lua', 'C', 'main', 'tail' */
icculus@0
   404
  const char *source;	/* (S) */
icculus@0
   405
  int currentline;	/* (l) */
icculus@0
   406
  int linedefined;	/* (S) */
icculus@0
   407
  int lastlinedefined;	/* (S) */
icculus@0
   408
  unsigned char nups;	/* (u) number of upvalues */
icculus@0
   409
  unsigned char nparams;/* (u) number of parameters */
icculus@0
   410
  char isvararg;        /* (u) */
icculus@0
   411
  char istailcall;	/* (t) */
icculus@0
   412
  char short_src[LUA_IDSIZE]; /* (S) */
icculus@0
   413
  /* private part */
icculus@0
   414
  struct CallInfo *i_ci;  /* active function */
icculus@0
   415
};
icculus@0
   416
icculus@0
   417
/* }====================================================================== */
icculus@0
   418
icculus@0
   419
icculus@0
   420
/******************************************************************************
icculus@0
   421
* Copyright (C) 1994-2013 Lua.org, PUC-Rio.
icculus@0
   422
*
icculus@0
   423
* Permission is hereby granted, free of charge, to any person obtaining
icculus@0
   424
* a copy of this software and associated documentation files (the
icculus@0
   425
* "Software"), to deal in the Software without restriction, including
icculus@0
   426
* without limitation the rights to use, copy, modify, merge, publish,
icculus@0
   427
* distribute, sublicense, and/or sell copies of the Software, and to
icculus@0
   428
* permit persons to whom the Software is furnished to do so, subject to
icculus@0
   429
* the following conditions:
icculus@0
   430
*
icculus@0
   431
* The above copyright notice and this permission notice shall be
icculus@0
   432
* included in all copies or substantial portions of the Software.
icculus@0
   433
*
icculus@0
   434
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
icculus@0
   435
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
icculus@0
   436
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
icculus@0
   437
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
icculus@0
   438
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
icculus@0
   439
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
icculus@0
   440
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
icculus@0
   441
******************************************************************************/
icculus@0
   442
icculus@0
   443
icculus@0
   444
#endif