renamed psl_is_tld() to psl_is_public()
This commit is contained in:
parent
0bead9b000
commit
577fd14bb4
|
@ -53,7 +53,7 @@ void
|
||||||
psl_ctx_t *
|
psl_ctx_t *
|
||||||
psl_load_file(const char *fname);
|
psl_load_file(const char *fname);
|
||||||
int
|
int
|
||||||
psl_is_tld(const psl_ctx_t *psl, const char *domain);
|
psl_is_public(const psl_ctx_t *psl, const char *domain);
|
||||||
|
|
||||||
/* does not include exceptions */
|
/* does not include exceptions */
|
||||||
int
|
int
|
||||||
|
|
|
@ -210,7 +210,7 @@ static void _suffix_init(_psl_entry_t *suffix, const char *rule, size_t length)
|
||||||
*dst = 0;
|
*dst = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int psl_is_tld(const psl_ctx_t *psl, const char *domain)
|
int psl_is_public(const psl_ctx_t *psl, const char *domain)
|
||||||
{
|
{
|
||||||
_psl_entry_t suffix, *rule;
|
_psl_entry_t suffix, *rule;
|
||||||
const char *p, *label_bak;
|
const char *p, *label_bak;
|
||||||
|
|
|
@ -4,11 +4,11 @@ AM_CPPFLAGS = -Wno-missing-field-initializers -I$(top_srcdir)/include
|
||||||
AM_LDFLAGS = -static
|
AM_LDFLAGS = -static
|
||||||
LDADD = ../src/libpsl-@LIBPSL_API_VERSION@.la
|
LDADD = ../src/libpsl-@LIBPSL_API_VERSION@.la
|
||||||
|
|
||||||
PSL_TESTS = test-is-tld
|
PSL_TESTS = test-is-public
|
||||||
|
|
||||||
check_PROGRAMS = $(PSL_TESTS)
|
check_PROGRAMS = $(PSL_TESTS)
|
||||||
|
|
||||||
test_is_tld_SOURCES = test-is-tld.c
|
test_is_tld_SOURCES = test-is-public.c
|
||||||
test_is_tld_LDADD = ../src/libpsl-@LIBPSL_API_VERSION@.la
|
test_is_tld_LDADD = ../src/libpsl-@LIBPSL_API_VERSION@.la
|
||||||
|
|
||||||
TESTS_ENVIRONMENT = TESTS_VALGRIND="@VALGRIND_ENVIRONMENT@"
|
TESTS_ENVIRONMENT = TESTS_VALGRIND="@VALGRIND_ENVIRONMENT@"
|
||||||
|
|
|
@ -69,7 +69,7 @@ static void test_psl(void)
|
||||||
|
|
||||||
for (it = 0; it < countof(test_data); it++) {
|
for (it = 0; it < countof(test_data); it++) {
|
||||||
const struct test_data *t = &test_data[it];
|
const struct test_data *t = &test_data[it];
|
||||||
int result = psl_is_tld(psl, t->domain);
|
int result = psl_is_public(psl, t->domain);
|
||||||
|
|
||||||
if (result == t->result) {
|
if (result == t->result) {
|
||||||
ok++;
|
ok++;
|
Loading…
Reference in New Issue