From 4567dacf6991d12b849b910fa29b52888f6440cb Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Sun, 16 Jul 2023 23:32:06 -0700 Subject: [PATCH] Clarify comment --- pcre.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcre.go b/pcre.go index 32d2ad3..e6a4f28 100644 --- a/pcre.go +++ b/pcre.go @@ -666,9 +666,10 @@ func (r *Regexp) SetCallout(fn func(cb *CalloutBlock) int32) error { return x } - // Prevent callout functions from being GC'd r.calloutMtx.Lock() defer r.calloutMtx.Unlock() + + // Prevent callout function from being GC'd r.callout = &cfn ret := lib.Xpcre2_set_callout_8(r.tls, r.mctx, *(*uintptr)(unsafe.Pointer(&cfn)), 0)