From bf32bde79a0c394e4cb8badbd679a8055b726d7e Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Wed, 25 Jan 2017 17:31:10 +0100 Subject: [PATCH] collect_project: add static method for adding src to cp-result functions Signed-off-by: Tobias Ulmer --- plugins/collect_project.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/collect_project.lua b/plugins/collect_project.lua index 2c673eb..c7da772 100644 --- a/plugins/collect_project.lua +++ b/plugins/collect_project.lua @@ -39,8 +39,10 @@ local source = require("source") local strict = require("strict") -------------------------------------------------------------------------------- --- collect project build process step first because real forward declarations --- aren't a thing in Lua. + +local _source_to_result_functions = { + -- type = function() +} --- Create Makefile based structure required to build the project -- without e2factory @@ -380,6 +382,12 @@ end local collect_project_class = class("collect_project_class", result.basic_result) +function collect_project_class.static:add_source_to_result_fn(typ, func) + assertIsStringN(typ) + assertIsFunction(func) + _source_to_result_functions[typ] = func +end + function collect_project_class:initialize(rawres) assertIsTable(rawres) assertNotNil(rawres.collect_project) -- 2.39.5