/** @file abs_index.h
*	Absolute index macro for LUA
*	@author Chris Burns (cburns@ea.com)
*
*	UX
*	(c) 2012 Electronic Arts Inc.
*/

#ifndef EABASETYPESLUA_ABSINDEX_H_
#define EABASETYPESLUA_ABSINDEX_H_

// from lauxlib.c
/* convert a stack index to positive */
#define abs_index(L, i)		((i) > 0 || (i) <= LUA_REGISTRYINDEX ? (i) : \
					lua_gettop(L) + (i) + 1)

#endif /* EABASETYPESLUA_ABSINDEX_H_ */
