Software /
code /
prosody
Comparison
util-src/encodings.c @ 10478:5e9a1a75f8a7
util.encodings: Don’t export unneeded symbols
This reduces the binary size from 22704 B to 18592 B.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 01 Dec 2019 23:34:45 +0100 |
parent | 10371:228338120009 |
child | 10479:d362934437eb |
comparison
equal
deleted
inserted
replaced
10477:28755107c2f4 | 10478:5e9a1a75f8a7 |
---|---|
214 | 214 |
215 /* | 215 /* |
216 * Check that a string is valid UTF-8 | 216 * Check that a string is valid UTF-8 |
217 * Returns NULL if not | 217 * Returns NULL if not |
218 */ | 218 */ |
219 const char *check_utf8(lua_State *L, int idx, size_t *l) { | 219 static const char *check_utf8(lua_State *L, int idx, size_t *l) { |
220 size_t pos, len; | 220 size_t pos, len; |
221 const char *s = luaL_checklstring(L, idx, &len); | 221 const char *s = luaL_checklstring(L, idx, &len); |
222 pos = 0; | 222 pos = 0; |
223 | 223 |
224 while(pos <= len) { | 224 while(pos <= len) { |
321 | 321 |
322 return 1; | 322 return 1; |
323 } | 323 } |
324 } | 324 } |
325 | 325 |
326 UStringPrepProfile *icu_nameprep; | 326 static UStringPrepProfile *icu_nameprep; |
327 UStringPrepProfile *icu_nodeprep; | 327 static UStringPrepProfile *icu_nodeprep; |
328 UStringPrepProfile *icu_resourceprep; | 328 static UStringPrepProfile *icu_resourceprep; |
329 UStringPrepProfile *icu_saslprep; | 329 static UStringPrepProfile *icu_saslprep; |
330 USpoofChecker *icu_spoofcheck; | 330 static USpoofChecker *icu_spoofcheck; |
331 UIDNA *icu_idna2008; | 331 static UIDNA *icu_idna2008; |
332 | 332 |
333 #if (U_ICU_VERSION_MAJOR_NUM < 58) | 333 #if (U_ICU_VERSION_MAJOR_NUM < 58) |
334 /* COMPAT */ | 334 /* COMPAT */ |
335 #define USPOOF_CONFUSABLE (USPOOF_SINGLE_SCRIPT_CONFUSABLE | USPOOF_MIXED_SCRIPT_CONFUSABLE | USPOOF_WHOLE_SCRIPT_CONFUSABLE) | 335 #define USPOOF_CONFUSABLE (USPOOF_SINGLE_SCRIPT_CONFUSABLE | USPOOF_MIXED_SCRIPT_CONFUSABLE | USPOOF_WHOLE_SCRIPT_CONFUSABLE) |
336 #endif | 336 #endif |
337 | 337 |
338 /* initialize global ICU stringprep profiles */ | 338 /* initialize global ICU stringprep profiles */ |
339 void init_icu(void) { | 339 static void init_icu(void) { |
340 UErrorCode err = U_ZERO_ERROR; | 340 UErrorCode err = U_ZERO_ERROR; |
341 utrace_setLevel(UTRACE_VERBOSE); | 341 utrace_setLevel(UTRACE_VERBOSE); |
342 icu_nameprep = usprep_openByType(USPREP_RFC3491_NAMEPREP, &err); | 342 icu_nameprep = usprep_openByType(USPREP_RFC3491_NAMEPREP, &err); |
343 icu_nodeprep = usprep_openByType(USPREP_RFC3920_NODEPREP, &err); | 343 icu_nodeprep = usprep_openByType(USPREP_RFC3920_NODEPREP, &err); |
344 icu_resourceprep = usprep_openByType(USPREP_RFC3920_RESOURCEPREP, &err); | 344 icu_resourceprep = usprep_openByType(USPREP_RFC3920_RESOURCEPREP, &err); |