From 709b261b4eb85487e8388223058d6c4de781edba Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Sun, 16 Jul 2023 23:27:57 -0700 Subject: [PATCH] Add doc comment to SetCallout function --- pcre.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcre.go b/pcre.go index d9adc92..32d2ad3 100644 --- a/pcre.go +++ b/pcre.go @@ -626,6 +626,9 @@ type CalloutBlock struct { CalloutFlags CalloutFlags } +// SetCallout sets a callout function that will be called at specified points in the matching operation. +// fn should return zero if it ran successfully or a non-zero integer to force an error. +// See https://www.pcre.org/current/doc/html/pcre2callout.html for more information. func (r *Regexp) SetCallout(fn func(cb *CalloutBlock) int32) error { cfn := func(tls *libc.TLS, cbptr, data uintptr) int32 { ccb := (*lib.Tpcre2_callout_block_8)(unsafe.Pointer(cbptr))