diff options
Diffstat (limited to 'xmake/core/base/singleton.lua')
| -rw-r--r-- | xmake/core/base/singleton.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/core/base/singleton.lua b/xmake/core/base/singleton.lua index 92be76664..2b4db4494 100644 --- a/xmake/core/base/singleton.lua +++ b/xmake/core/base/singleton.lua @@ -45,6 +45,10 @@ local singleton = singleton or {} -- return instance -- end -- +-- @param key the singleton key (string or function) +-- @param init the initializer function (optional) +-- @return the singleton instance, inited (true if already initialized) +-- function singleton.get(key, init) -- get key |
