perl-XS-Parse-Keyword/XS-Parse-Keyword-0.12-Bump-ABI-version.patch

71 lines
2.5 KiB
Diff
Raw Normal View History

From fdc0155eb495a0082bf9815d34bc46a240b8c97b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Tue, 17 Aug 2021 09:28:45 +0200
Subject: [PATCH] Bump ABI version
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Struct XSParseKeywordPieceType changed size in XS-Parse-Keyword-0.12.
CPAN RT#138708.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
XSParseKeyword.h | 4 ++--
lib/XS/Parse/Keyword.xs | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/XSParseKeyword.h b/XSParseKeyword.h
index d114bb9..a614da3 100644
--- a/XSParseKeyword.h
+++ b/XSParseKeyword.h
@@ -1,7 +1,7 @@
#ifndef __XS_PARSE_KEYWORD_H__
#define __XS_PARSE_KEYWORD_H__
-#define XSPARSEKEYWORD_ABI_VERSION 1
+#define XSPARSEKEYWORD_ABI_VERSION 2
struct XSParseKeywordPieceType;
struct XSParseKeywordPieceType {
@@ -215,7 +215,7 @@ static void S_boot_xs_parse_keyword(pTHX_ double ver) {
abi_ver);
register_xs_parse_keyword_func = INT2PTR(void (*)(pTHX_ const char *, const struct XSParseKeywordHooks *, void *),
- SvUV(*hv_fetchs(PL_modglobal, "XS::Parse::Keyword/register()@1", 0)));
+ SvUV(*hv_fetchs(PL_modglobal, "XS::Parse::Keyword/register()@2", 0)));
}
#endif
diff --git a/lib/XS/Parse/Keyword.xs b/lib/XS/Parse/Keyword.xs
index d512f4f..3e57e01 100644
--- a/lib/XS/Parse/Keyword.xs
+++ b/lib/XS/Parse/Keyword.xs
@@ -738,9 +738,9 @@ static void reg(pTHX_ const char *kwname, int apiver, const struct XSParseKeywor
}
}
-static void IMPL_register_v1(pTHX_ const char *kwname, const struct XSParseKeywordHooks *hooks, void *hookdata)
+static void IMPL_register_v2(pTHX_ const char *kwname, const struct XSParseKeywordHooks *hooks, void *hookdata)
{
- reg(aTHX_ kwname, 1, hooks, hookdata);
+ reg(aTHX_ kwname, 2, hooks, hookdata);
}
static int (*next_keyword_plugin)(pTHX_ char *, STRLEN, OP **);
@@ -793,8 +793,8 @@ BOOT:
/* newer versions */
sv_setiv(*hv_fetchs(PL_modglobal, "XS::Parse::Keyword/ABIVERSION_MIN", 1), XSPARSEKEYWORD_ABI_VERSION);
- sv_setiv(*hv_fetchs(PL_modglobal, "XS::Parse::Keyword/ABIVERSION_MAX", 1), 1);
+ sv_setiv(*hv_fetchs(PL_modglobal, "XS::Parse::Keyword/ABIVERSION_MAX", 1), 2);
- sv_setuv(*hv_fetchs(PL_modglobal, "XS::Parse::Keyword/register()@1", 1), PTR2UV(&IMPL_register_v1));
+ sv_setuv(*hv_fetchs(PL_modglobal, "XS::Parse::Keyword/register()@2", 1), PTR2UV(&IMPL_register_v2));
wrap_keyword_plugin(&my_keyword_plugin, &next_keyword_plugin);
--
2.31.1