From a0503305bd95c40c0cbf5e78b345c30721176998 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 16 Jan 2015 11:26:55 -0200 Subject: comments --- llimits.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/llimits.h b/llimits.h index 9e315f8b..db9e7741 100644 --- a/llimits.h +++ b/llimits.h @@ -1,5 +1,5 @@ /* -** $Id: llimits.h,v 1.125 2014/12/19 13:30:23 roberto Exp roberto $ +** $Id: llimits.h,v 1.126 2015/01/13 15:49:11 roberto Exp roberto $ ** Limits, basic types, and some other 'installation-dependent' definitions ** See Copyright Notice in lua.h */ @@ -99,11 +99,13 @@ typedef LUAI_UACINT l_uacInt; #define api_check(e,msg) luai_apicheck((e) && msg) +/* macro to avoid warnings about unused variables */ #if !defined(UNUSED) -#define UNUSED(x) ((void)(x)) /* to avoid warnings */ +#define UNUSED(x) ((void)(x)) #endif +/* type casts (a macro highlights casts in the code) */ #define cast(t, exp) ((t)(exp)) #define cast_void(i) cast(void, (i)) @@ -176,11 +178,19 @@ typedef unsigned long Instruction; #endif +/* +** macros that are executed whenether program enters the Lua core +** ('lua_lock') and leaves the core ('lua_unlock') +*/ #if !defined(lua_lock) #define lua_lock(L) ((void) 0) #define lua_unlock(L) ((void) 0) #endif +/* +** macro executed during Lua functions at points where the +** function can yield. +*/ #if !defined(luai_threadyield) #define luai_threadyield(L) {lua_unlock(L); lua_lock(L);} #endif -- cgit v1.2.3-55-g6feb