Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: pcre callouts
- X-seq: zsh-workers 52271
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: pcre callouts
- Date: Fri, 03 Nov 2023 10:50:34 +0100
- Archived-at: <https://zsh.org/workers/52271>
- In-reply-to: <CAH+w=7ZXiPkDRaW+QjdKpZ3+ghk5-0wzj_dBr+maFJ8igu4x0A@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <72311-1698710659.978677@cDMN.pAu_.Ex7V> <CAH+w=7bNAmZP3x+4n1qYCQBQiTM+9TZgTumVXnAftoeFcHcToA@mail.gmail.com> <31963-1698804298.865464@oYlZ.u4GW.p43I> <CAH+w=7ZXiPkDRaW+QjdKpZ3+ghk5-0wzj_dBr+maFJ8igu4x0A@mail.gmail.com>
Bart Schaefer wrote:
> I didn't try applying the previous patch, but now that this one has
> been pushed to sourceforge:
I'm less sure on whether to push the later one for setting a scope.
And perhaps whether to add a -f option to pcre_match for a fixed callout
function that can avoid shell evaluation and handle numeric callouts.
> pcre.c: In function ‘pcre_callout’:
> pcre.c:132:44: error: parameter name omitted
> 132 | pcre_callout(pcre2_callout_block_8 *block, void *)
> | ^~~~~~
Sorry, I think the following form should be right.
Oliver
diff --git a/Src/Modules/pcre.c b/Src/Modules/pcre.c
index e6b59831f..e48ae3ae5 100644
--- a/Src/Modules/pcre.c
+++ b/Src/Modules/pcre.c
@@ -129,7 +129,7 @@ bin_pcre_study(char *nam, UNUSED(char **args), UNUSED(Options ops), UNUSED(int f
}
static int
-pcre_callout(pcre2_callout_block_8 *block, void *)
+pcre_callout(pcre2_callout_block_8 *block, UNUSED(void *callout_data))
{
Eprog prog;
int ret=0;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author