@@ -3962,8 +3962,8 @@ this confuses the next call to @Lid{lua_next}.
39623962
39633963This function may raise an error if the given key
39643964is neither @nil nor present in the table.
3965- See function @Lid{next} for the caveats of modifying
3966- the table during its traversal.
3965+
3966+ See function @Lid{next} for more details about the traversal.
39673967
39683968}
39693969
@@ -4448,7 +4448,7 @@ Starts and resumes a coroutine in the given thread @id{L}.
44484448To start a coroutine,
44494449you push the main function plus any arguments
44504450onto the empty stack of the thread.
4451- then you call @Lid{lua_resume},
4451+ Then you call @Lid{lua_resume},
44524452with @id{nargs} being the number of arguments.
44534453The function returns when the coroutine suspends,
44544454finishes its execution, or raises an unprotected error.
@@ -4628,7 +4628,7 @@ You can resume threads with status @Lid{LUA_OK}
46284628}
46294629
46304630@APIEntry{size_t lua_stringtonumber (lua_State *L, const char *s);|
4631- @apii{0,1,-}
4631+ @apii{0,0| 1,-}
46324632
46334633Converts the zero-terminated string @id{s} to a number,
46344634pushes that number into the stack,
@@ -4958,7 +4958,7 @@ Lua calls the given @x{continuation function} @id{k} to continue
49584958the execution of the @N{C function} that yielded @see{continuations}.
49594959This continuation function receives the same stack
49604960from the previous function,
4961- with the @id{n} results removed and
4961+ with all the results ( @id{nresults}) removed and
49624962replaced by the arguments passed to @Lid{lua_resume}.
49634963Moreover,
49644964the continuation function receives the value @id{ctx}
@@ -5048,7 +5048,7 @@ the function was defined in a string where
50485048}
50495049
50505050@item{@id{srclen}|
5051- The length of the string @id{source}.
5051+ the length of the string @id{source}.
50525052}
50535053
50545054@item{@id{short_src}|
@@ -5212,7 +5212,7 @@ running at the given level;
52125212}
52135213
52145214@item{@Char{S}|
5215- fills in the fields @id{source}, @id{short_src},
5215+ fills in the fields @id{source}, @id{srclen}, @id{ short_src},
52165216@id{linedefined}, @id{lastlinedefined}, and @id{what};
52175217}
52185218
@@ -5388,7 +5388,9 @@ Returns @id{NULL} (and pops nothing)
53885388when the index is greater than
53895389the number of active local variables.
53905390
5391- Parameters @id{ar} and @id{n} are as in the function @Lid{lua_getlocal}.
5391+ Parameters @id{ar} and @id{n} are as in the function @Lid{lua_getlocal},
5392+ except that @id{ar} cannot be @id{NULL},
5393+ as @id{lua_setlocal} only operates on activation records.
53925394
53935395}
53945396
@@ -6832,8 +6834,7 @@ for k,v in pairs(t) do @rep{body} end
68326834}
68336835will iterate over all key@En{}value pairs of table @id{t}.
68346836
6835- See function @Lid{next} for the caveats of modifying
6836- the table during its traversal.
6837+ See function @Lid{next} for more details about the traversal.
68376838
68386839}
68396840
@@ -9123,6 +9124,7 @@ which automatically removes the file when the program ends.
91239124
91249125This library provides
91259126the functionality of the @link{debugI|debug interface} to Lua programs.
9127+
91269128You should exert care when using this library.
91279129Several of its functions
91289130violate basic assumptions about Lua code
@@ -9132,6 +9134,8 @@ that userdata metatables cannot be changed by Lua code;
91329134that Lua programs do not crash)
91339135and therefore can compromise otherwise secure code.
91349136Moreover, some functions in this library may be slow.
9137+ It is good practice to always require this library explicitly
9138+ before using it.
91359139
91369140All functions in this library are provided
91379141inside the @defid{debug} table.
0 commit comments