Skip to content

Commit

Permalink
Merge pull request darktable-org#1196 from supertobi/patch-1
Browse files Browse the repository at this point in the history
minor cleanups debug.lua
  • Loading branch information
boucman committed Apr 19, 2016
2 parents c1be2cc + 15b1408 commit 978f96c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions data/lua/darktable/debug.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local indent_string =" "
local indent_string = " "
local table = require "table"
local dt = require "darktable"
local debug = require "debug"
Expand All @@ -12,7 +12,6 @@ local function get_userdata_type(object)
local metatable = getmetatable(object);
if not metatable then return end
return metatable.__luaA_TypeName

end

local function header(object,indent,name,obj_expand_mode)
Expand Down Expand Up @@ -41,6 +40,7 @@ local function key(object)
end
return object
end

local function introspect_metatable(object,indent,name,known,ancestors)
if not M.debug then return "" end
if name == nil then name = "(unknown)" end
Expand All @@ -52,6 +52,7 @@ local function introspect_metatable(object,indent,name,known,ancestors)
table.remove(ancestors);
return result
end

local function introspect_uservalue(object,indent,name,known,ancestors)
if not M.debug then return "" end
if name == nil then name = "(unknown)" end
Expand All @@ -64,7 +65,6 @@ local function introspect_uservalue(object,indent,name,known,ancestors)
return result
end


introspect_body = function (object,indent,name,known,ancestors)
if name == nil then name = "(unknown)" end
local result = ""
Expand Down Expand Up @@ -121,16 +121,13 @@ introspect_body = function (object,indent,name,known,ancestors)
return result
end
error("unknown type of object")

end

introspect_internal = function(object,indent,name,known,ancestors)
local result = header(object,indent,name)
return result..introspect_body(object,indent,name,known,ancestors)
end



function M.dump(object,name,orig_known)
if name == nil or name == "" then
name = "toplevel"
Expand Down

0 comments on commit 978f96c

Please sign in to comment.