From b8e59927d5817f14ece2d9fbf874c8549f8028e9 Mon Sep 17 00:00:00 2001 From: Michael Lenaghan Date: Thu, 13 Jun 2024 12:45:18 -0400 Subject: [PATCH] Restore Cosmo-added comment. --- third_party/lua/lauxlib.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/third_party/lua/lauxlib.c b/third_party/lua/lauxlib.c index bd9504d25..4f9ce3a79 100644 --- a/third_party/lua/lauxlib.c +++ b/third_party/lua/lauxlib.c @@ -38,10 +38,35 @@ __static_yoink("lua_notice"); -/* -** This file uses only the official API of Lua. -** Any function declared here could be written as an application function. - */ +/** + * @fileoverview The Auxiliary Library + * + * The auxiliary library provides several convenient functions to interface C + * with Lua. While the basic API provides the primitive functions for all + * interactions between C and Lua, the auxiliary library provides + * higher-level functions for some common tasks. + * + * All functions and types from the auxiliary library are defined in header + * file lauxlib.h and have a prefix luaL_. + * + * All functions in the auxiliary library are built on top of the basic API, + * and so they provide nothing that cannot be done with that API. + * Nevertheless, the use of the auxiliary library ensures more consistency to + * your code. + * + * Several functions in the auxiliary library use internally some extra stack + * slots. When a function in the auxiliary library uses less than five slots, + * it does not check the stack size; it simply assumes that there are enough + * slots. + * + * Several functions in the auxiliary library are used to check C function + * arguments. Because the error message is formatted for arguments (e.g., + * "bad argument #1"), you should not use these functions for other stack + * values. + * + * Functions called luaL_check* always raise an error if the check is not + * satisfied. + */ #if !defined(MAX_SIZET)