From 7a74219cc543dc2b25a5831e8a9f22a63909cd75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 26 Mar 2019 16:20:31 +0800 Subject: =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=AD=98=E6=B4=BB=E7=9A=84=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/vm/library.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/src/vm/library.lua') diff --git a/server/src/vm/library.lua b/server/src/vm/library.lua index 54dca81f..ed5c2e7f 100644 --- a/server/src/vm/library.lua +++ b/server/src/vm/library.lua @@ -1,7 +1,7 @@ local sourceMgr = require 'vm.source' local valueMgr -local createFunction +local functionMgr local CHILD_CACHE = {} local VALUE_CACHE = {} @@ -15,7 +15,7 @@ function buildLibValue(lib) end if not valueMgr then valueMgr = require 'vm.value' - createFunction = require 'vm.function' + functionMgr = require 'vm.function' end local tp = lib.type local value @@ -23,7 +23,7 @@ function buildLibValue(lib) value = valueMgr.create('table', sourceMgr.dummy()) elseif tp == 'function' then value = valueMgr.create('function', sourceMgr.dummy()) - local func = createFunction() + local func = functionMgr.create() value:setFunction(func) if lib.args then for _, arg in ipairs(lib.args) do @@ -69,7 +69,7 @@ end function buildLibChild(lib) if not valueMgr then valueMgr = require 'vm.value' - createFunction = require 'vm.function' + functionMgr = require 'vm.function' end if CHILD_CACHE[lib] then return CHILD_CACHE[lib] -- cgit v1.2.3