Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
peacalm committed Apr 23, 2023
1 parent b0c1604 commit 69b597d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/peacalm/lua_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ class lua_wrapper {
self_t& gseek(const std::string& name) { return gseek(name.c_str()); }

/// Push t[name] onto the stack where t is the value at the given index `idx`,
/// or push a nil on failed.
/// or push a nil if the operation fails.
self_t& seek(const char* name, int idx = -1) {
if (gettop() > 0 && istable(idx)) {
lua_getfield(L_, idx, name);
Expand All @@ -661,7 +661,7 @@ class lua_wrapper {
self_t& seek(const std::string& name) { return seek(name.c_str()); }

/// Push t[n] onto the stack where t is the value at the given index `idx`, or
/// push a nil on failed.
/// push a nil if the operation fails.
self_t& seek(int n, int idx = -1) {
if (gettop() > 0 && istable(idx)) {
lua_geti(L_, idx, n);
Expand Down

0 comments on commit 69b597d

Please sign in to comment.