From: Daniel Kolesa Date: Tue, 26 Apr 2016 13:37:47 +0000 (+0100) Subject: docgen: only generate params for methods when they exist X-Git-Tag: upstream/1.20.0~6364^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de66784dba4f13001c202033bd5149f544fc006a;p=platform%2Fupstream%2Fefl.git docgen: only generate params for methods when they exist --- diff --git a/gendoc.lua b/gendoc.lua index 7de53cc..c59b50d 100644 --- a/gendoc.lua +++ b/gendoc.lua @@ -1349,8 +1349,12 @@ build_method = function(fn, cl) f:write_code(gen_func_csig(fn), "c") f:write_nl() - f:write_h("Parameters", 3) - build_parlist(f, fn:parameters_get():to_array()) + local pars = fn:parameters_get():to_array() + if #pars > 0 then + f:write_h("Parameters", 3) + build_parlist(f, pars) + f:write_nl() + end f:write_h("Description", 3) write_full_doc(f, fn:documentation_get(eolian.function_type.METHOD))