blob: e71d0375defa205856d2a391fe3062611117a380 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
return function(utf8)
local provided = utf8.config.runtime_charclasses
if provided then
if type(provided) == "table" then
return provided
elseif type(provided) == "function" then
return provided(utf8)
else
return utf8:require(provided)
end
end
local ffi = pcall(require, "ffi")
if not ffi then
return utf8:require "charclass.runtime.dummy"
else
return utf8:require "charclass.runtime.native"
end
end
|