[Tile-serving] [openstreetmap/osm2pgsql] Remove verbose comments and else after return (#1169)
mmd
notifications at github.com
Thu May 14 14:14:38 UTC 2020
@mmd-osm commented on this pull request.
> @@ -153,29 +153,26 @@ static int pcall_error_traceback_handler(lua_State *lua_state)
assert(lua_state);
char const *msg = lua_tostring(lua_state, 1);
- if (msg == nullptr) { // is error object not a string?
- if (luaL_callmeta(lua_state, 1,
- "__tostring") && // does it have a metamethod
- lua_type(lua_state, -1) == LUA_TSTRING) { // that produces a string?
- return 1; // that is the message
- } else {
- msg = lua_pushfstring(lua_state, "(error object is a %s value)",
- luaL_typename(lua_state, 1));
+ if (msg == nullptr) {
+ if (luaL_callmeta(lua_state, 1, "__tostring") &&
+ lua_type(lua_state, -1) == LUA_TSTRING) {
+ return 1;
This part of the code is fairly cryptic, not sure if it's really a good idea to entirely remove all comments here. You can do me a favor and add a link to https://github.com/lua/lua/blob/master/lua.c so people who want to understand this code know where to look for more information.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1169#pullrequestreview-411847635
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200514/bd5ceef7/attachment.htm>
More information about the Tile-serving
mailing list