Skip to content

Commit

Permalink
memcached: rename internal module function memcached_init()
Browse files Browse the repository at this point in the history
Name of internal function for creating a new memcached instance is
memcached_init(). It may be confusing - name can be mixed up with
name of function for module initialization.

In the following commit we will need an explicit function
for module initialization, memcached_init() was renamed to
memcached_create_instance() for clarity.

This commit changes internal function's name, no impact on public API.

Needed for #96
  • Loading branch information
ligurio committed Apr 6, 2022
1 parent 1706b15 commit 1829088
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions memcached/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ local memcached_methods = {
end
}

local function memcached_init(name, uri, opts)
local function memcached_create_instance(name, uri, opts)
opts = opts or {}
if memcached_services[name] ~= nil then
if not opts.if_not_exists then
Expand Down Expand Up @@ -387,7 +387,7 @@ local function memcached_get(name)
end

return {
create = memcached_init,
create = memcached_create_instance,
get = memcached_get,
server = setmetatable({}, {
__index = memcached_services
Expand Down

0 comments on commit 1829088

Please sign in to comment.