Index: trunk/src/lib/lua.cc
===================================================================
--- trunk/src/lib/lua.cc	(revision 164)
+++ trunk/src/lib/lua.cc	(revision 165)
@@ -27,7 +27,10 @@
 #	define NV_LUA_FUN_51( rtype, fname, fparams )
 #	define NV_LUA_FUN_52 NV_LUA_FUN
+#elif NV_LUA_VERSION == NV_LUA_51
+#	define NV_LUA_FUN_51 NV_LUA_FUN
+#	define NV_LUA_FUN_52( rtype, fname, fparams ) 
 #else
-#	define NV_LUA_FUN_51 NV_LUA_FUN
-#	define NV_LUA_FUN_52( rtype, fname, fparams )
+#	define NV_LUA_FUN_51( rtype, fname, fparams )
+#	define NV_LUA_FUN_52( rtype, fname, fparams ) 
 #endif
 
@@ -48,14 +51,17 @@
 #		define NV_LUA_FUN_51( rtype, fname, fparams )
 #		define NV_LUA_FUN_52 NV_LUA_FUN
+#	elif NV_LUA_VERSION == NV_LUA_51
+#		define NV_LUA_FUN_51 NV_LUA_FUN
+#		define NV_LUA_FUN_52( rtype, fname, fparams ) 
 #	else
-#		define NV_LUA_FUN_51 NV_LUA_FUN
+#		define NV_LUA_FUN_51( rtype, fname, fparams )
 #		define NV_LUA_FUN_52( rtype, fname, fparams ) 
 #	endif
 
-#include <nv/lib/detail/lua_functions.inc>
+#	include <nv/lib/detail/lua_functions.inc>
 
-#undef NV_LUA_FUN
-#undef NV_LUA_FUN_51
-#undef NV_LUA_FUN_52
+#	undef NV_LUA_FUN
+#	undef NV_LUA_FUN_51
+#	undef NV_LUA_FUN_52
 	return true;
 }
