c - 任何人都可以在 PCRE2 中包含 JIT 功能吗?
问题描述
我写了一个工作 pcre2.c。现在我想修改它以使用 JIT 编译和 jit 匹配,但我不让它与 pcre2 页面的常见问题解答一起使用。
http://www.rtsdd.ru/downloads/ADANCURSESN/pcre2-10.31/src/pcre2_jit_match.c
re = pcre2_compile(
pattern, /* the pattern */
PCRE2_ZERO_TERMINATED, /* indicates pattern is zero-terminated */
PCRE2_CASELESS, /* default options */
&errornumber, /* for error number */
&erroroffset, /* for error offset */
NULL); /* use default compile context */
if (re == NULL)
{
PCRE2_UCHAR buffer[256];
pcre2_get_error_message(errornumber, buffer, sizeof(buffer));
printf("PCRE2 compilation failed at offset %d: %s\n", (int)erroroffset,
buffer);
return 1;
}
match_data = pcre2_match_data_create_from_pattern(re, NULL);
rc = pcre2_match(
re, /* the compiled pattern */
subject, /* the subject string */
subject_length, /* the length of the subject */
55, /* start at offset 0 in the subject */
0, /* default options */
match_data, /* block for storing the result */
NULL); /* use default match context */
}
JIT 部分必须包含在 pcre2_compile() 之后。但我还没有找到可行的解决方案。
解决方案
推荐阅读
- python - 如何将 GitHub 制作成 pandas DataFrame?
- typescript - 如何创建数字的子类型?
- python - 将字符串中的最后一个单词与前面的每个单词组合起来
- swift - 使用通用参数创建 async/await 函数
- python - 如何使用 pd.read_xml 正确解析 SEC cal.xml 文件?
- css - Safari 和 Chrome 之间的 CSS 'visibility:collapse' 错误?
- c# - 如何在 Unity 中使 UI 看起来像 Pixel Perfect?
- java - 使用的 lambda 表达式中未触发断点 n CompletableFuture.supplyAsync(Supplier) (不是由于延迟执行)
- c# - 下拉值需要传入repeater控件绑定方法
- android - 获取 Android Dialog Window 的实际偏移量