Config returns code unit count for strings - didn't always.
This commit is contained in:
parent
bcf59568aa
commit
bb34dede56
|
@ -129,9 +129,8 @@ switch (what)
|
||||||
#ifdef SUPPORT_JIT
|
#ifdef SUPPORT_JIT
|
||||||
{
|
{
|
||||||
const char *v = PRIV(jit_get_target)();
|
const char *v = PRIV(jit_get_target)();
|
||||||
return (where == NULL)?
|
return 1 + ((where == NULL)?
|
||||||
(int)((strlen(v) + 1) * sizeof(PCRE2_UCHAR)) :
|
(int)strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v));
|
||||||
PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v) + 1;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
return PCRE2_ERROR_BADOPTION;
|
return PCRE2_ERROR_BADOPTION;
|
||||||
|
@ -172,10 +171,9 @@ switch (what)
|
||||||
#else
|
#else
|
||||||
const char *v = "Unicode not supported";
|
const char *v = "Unicode not supported";
|
||||||
#endif
|
#endif
|
||||||
return (where == NULL)?
|
return 1 + ((where == NULL)?
|
||||||
(int)((strlen(v) + 1) * sizeof(PCRE2_UCHAR)) :
|
(int)strlen(v): PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v));
|
||||||
PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v) + 1;
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCRE2_CONFIG_UNICODE:
|
case PCRE2_CONFIG_UNICODE:
|
||||||
|
@ -210,9 +208,8 @@ switch (what)
|
||||||
const char *v = (XSTRING(Z PCRE2_PRERELEASE)[1] == 0)?
|
const char *v = (XSTRING(Z PCRE2_PRERELEASE)[1] == 0)?
|
||||||
XSTRING(PCRE2_MAJOR.PCRE2_MINOR PCRE2_DATE) :
|
XSTRING(PCRE2_MAJOR.PCRE2_MINOR PCRE2_DATE) :
|
||||||
XSTRING(PCRE2_MAJOR.PCRE2_MINOR) XSTRING(PCRE2_PRERELEASE PCRE2_DATE);
|
XSTRING(PCRE2_MAJOR.PCRE2_MINOR) XSTRING(PCRE2_PRERELEASE PCRE2_DATE);
|
||||||
return (where == NULL)?
|
return 1 + ((where == NULL)?
|
||||||
(int)((strlen(v) + 1) * sizeof(PCRE2_UCHAR)) :
|
(int)strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v));
|
||||||
PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v) + 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5768,7 +5768,7 @@ if (rc != 0)
|
||||||
print_unicode_version(stdout);
|
print_unicode_version(stdout);
|
||||||
printf(")\n");
|
printf(")\n");
|
||||||
}
|
}
|
||||||
else printf(" No UTF or UCP support\n");
|
else printf(" No Unicode support\n");
|
||||||
|
|
||||||
(void)PCRE2_CONFIG(PCRE2_CONFIG_JIT, &rc);
|
(void)PCRE2_CONFIG(PCRE2_CONFIG_JIT, &rc);
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
|
|
Loading…
Reference in New Issue