diff options
| author | christos <christos@NetBSD.org> | 2014-07-20 20:17:21 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2014-07-20 20:17:21 +0000 |
| commit | c80dfef2b1aae6f50bc152fcd160181f5d6d75ba (patch) | |
| tree | 029355bb9d5c197ba06be6198576c8c36fce97dd /lib/libc/stdlib/hcreate.3 | |
| parent | cfd7b574b2ab2665ab88f30175c7d8e18a1baaa3 (diff) | |
amend the new destroy function to take function pointers.
Diffstat (limited to 'lib/libc/stdlib/hcreate.3')
| -rw-r--r-- | lib/libc/stdlib/hcreate.3 | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/lib/libc/stdlib/hcreate.3 b/lib/libc/stdlib/hcreate.3 index 10eb974d818..129a282b63d 100644 --- a/lib/libc/stdlib/hcreate.3 +++ b/lib/libc/stdlib/hcreate.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: hcreate.3,v 1.12 2014/07/20 13:41:14 wiz Exp $ +.\" $NetBSD: hcreate.3,v 1.13 2014/07/20 20:17:21 christos Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -51,11 +51,11 @@ .Ft void .Fn hdestroy "void" .Ft void -.Fn hdestroy1 "int flags" +.Fn hdestroy1 "void (*freekey)(void *)" "void (*freedata)(void *)" .Ft void .Fn hdestroy_r "struct hsearch_data *table" .Ft void -.Fn hdestroy1_r "struct hsearch_data *table" "int flags" +.Fn hdestroy1_r "struct hsearch_data *table" "void (*freekey)(void *)" "void (*freedata)(void *)" .Ft ENTRY * .Fn hsearch "ENTRY item" "ACTION action" .Ft int @@ -166,27 +166,23 @@ function provided, the .Fn hdestroy1 and .Fn hdestroy1_r -allow controlling if the +allow controlling how the .Fa key or .Fa value will be freed using the -.Fa flags -argument. -If the bit -.Dv FREE_KEY -is set, then the +provided functions in the +.Fa freekey +and +.Fa freedata +arguments. +If they are +.Dv NULL , +then .Fa key -of each entry will be -passed to -.Xr free 3 . -If the bit -.Dv FREE_VALUE -is set, then the +and .Fa value -of each entry will be -passed to -.Xr free 3 . +are not freed. .Pp The .Fn hcreate_r , |
