Commit 7ff12fdc authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

vre: Homework for later

parent 34dbf94c
......@@ -287,6 +287,10 @@ Notable breaking changes:
- ``VRE_export()`` packs a usable ``vre_t`` that can be persisted as a byte
stream
An exported regular expression takes the form of a byte stream of a given size
that can be used as-is by the various matching functions. Care should be taken
to always maintain pointer alignment of an exported ``vre_t``.
The ``VRE_ERROR_NOMATCH`` symbol is now hard-linked like ``VRE_CASELESS``, and
``VRE_NOTEMPTY`` is no longer supported. There are no match options left in
the VRE facade but the ``VRE_match()``, ``VRE_capture()`` and ``VRE_sub()``
......
......@@ -135,6 +135,10 @@ pcre2_code *
VRE_unpack(const vre_t *code)
{
/* XXX: The ban code ensures that regex "lumps" are pointer-aligned,
* but coming for example from a VMOD there is no guarantee. Should
* we formally require that code is properly aligned?
*/
CHECK_OBJ_NOTNULL(code, VRE_MAGIC);
if (code->re == VRE_PACKED_RE) {
AZ(code->re_ctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment