forked from Elara6331/pcre
Add doc comment to SetCallout function
This commit is contained in:
parent
23f1d484df
commit
709b261b4e
3
pcre.go
3
pcre.go
@ -626,6 +626,9 @@ type CalloutBlock struct {
|
|||||||
CalloutFlags CalloutFlags
|
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 {
|
func (r *Regexp) SetCallout(fn func(cb *CalloutBlock) int32) error {
|
||||||
cfn := func(tls *libc.TLS, cbptr, data uintptr) int32 {
|
cfn := func(tls *libc.TLS, cbptr, data uintptr) int32 {
|
||||||
ccb := (*lib.Tpcre2_callout_block_8)(unsafe.Pointer(cbptr))
|
ccb := (*lib.Tpcre2_callout_block_8)(unsafe.Pointer(cbptr))
|
||||||
|
Loading…
Reference in New Issue
Block a user