Skip to content

Commit 3507f12

Browse files
committed
change: rename libchash.so to librestychash.so. openresty#14
1 parent d058c56 commit 3507f12

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ INSTALL ?= install
1010
SRC := chash.c
1111
OBJ := $(SRC:.c=.o)
1212

13-
C_SO_NAME := libchash.so
13+
C_SO_NAME := librestychash.so
1414

1515
CFLAGS := -Wall -O3 -flto -g -DFP_RELAX=0 -DDEBUG
1616
THE_CFLAGS := $(CFLAGS) -fPIC -MMD -fvisibility=hidden
1717

18+
test := t
19+
1820
.PHONY = all test clean install
1921

2022
all : $(C_SO_NAME)
@@ -35,7 +37,7 @@ install:
3537
$(INSTALL) $(C_SO_NAME) $(DESTDIR)$(LUA_LIB_DIR)/
3638

3739
test : all
38-
PATH=$(OPENRESTY_PREFIX)/nginx/sbin:$$PATH prove -I../test-nginx/lib -r t
40+
PATH=$(OPENRESTY_PREFIX)/nginx/sbin:$$PATH prove -I../test-nginx/lib -r $(test)
3941

4042
bench:
4143
$(OPENRESTY_PREFIX)/bin/resty t/bench.lua

lib/resty/chash.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ local _M = {}
7777
local mt = { __index = _M }
7878

7979

80-
local clib = load_shared_lib("libchash.so")
80+
local clib = load_shared_lib("librestychash.so")
8181
if not clib then
82-
error("can not load libchash.so")
82+
error("can not load librestychash.so")
8383
end
8484

8585
local CONSISTENT_POINTS = 160 -- points per server

0 commit comments

Comments
 (0)