diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-03-05 17:15:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:52:14 -0500 |
commit | af30a32b6924b0f2b701186e435defbca2ebd1aa (patch) | |
tree | 8d11dd6ca7ede55e385670f1297045d78fc92e5a /source4/lib/util/idtree.c | |
parent | 5d0aa16dfcf3047a52d3dd7e12ffb704a9725e83 (diff) | |
download | samba-af30a32b6924b0f2b701186e435defbca2ebd1aa.tar.gz samba-af30a32b6924b0f2b701186e435defbca2ebd1aa.tar.bz2 samba-af30a32b6924b0f2b701186e435defbca2ebd1aa.zip |
r13840: Mark some functions as public.
(This used to be commit 9a188eb1f48a50d92a67a4fc2b3899b90074059a)
Diffstat (limited to 'source4/lib/util/idtree.c')
-rw-r--r-- | source4/lib/util/idtree.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source4/lib/util/idtree.c b/source4/lib/util/idtree.c index 1ccf6d5e81..d29c3b8fbd 100644 --- a/source4/lib/util/idtree.c +++ b/source4/lib/util/idtree.c @@ -310,21 +310,21 @@ static int _idr_remove(struct idr_context *idp, int id) this is the public interface **************************************************************************/ -/* +/** initialise a idr tree. The context return value must be passed to all subsequent idr calls. To destroy the idr tree use talloc_free() on this context */ -struct idr_context *idr_init(TALLOC_CTX *mem_ctx) +_PUBLIC_ struct idr_context *idr_init(TALLOC_CTX *mem_ctx) { return talloc_zero(mem_ctx, struct idr_context); } -/* +/** allocate the next available id, and assign 'ptr' into its slot. you can retrieve later this pointer using idr_find() */ -int idr_get_new(struct idr_context *idp, void *ptr, int limit) +_PUBLIC_ int idr_get_new(struct idr_context *idp, void *ptr, int limit) { int ret = idr_get_new_above_int(idp, ptr, 0); if (ret > limit) { @@ -334,11 +334,11 @@ int idr_get_new(struct idr_context *idp, void *ptr, int limit) return ret; } -/* +/** allocate a new id, giving the first available value greater than or equal to the given starting id */ -int idr_get_new_above(struct idr_context *idp, void *ptr, int starting_id, int limit) +_PUBLIC_ int idr_get_new_above(struct idr_context *idp, void *ptr, int starting_id, int limit) { int ret = idr_get_new_above_int(idp, ptr, starting_id); if (ret > limit) { @@ -348,10 +348,10 @@ int idr_get_new_above(struct idr_context *idp, void *ptr, int starting_id, int l return ret; } -/* +/** allocate a new id randomly in the given range */ -int idr_get_new_random(struct idr_context *idp, void *ptr, int limit) +_PUBLIC_ int idr_get_new_random(struct idr_context *idp, void *ptr, int limit) { int id; @@ -366,18 +366,18 @@ int idr_get_new_random(struct idr_context *idp, void *ptr, int limit) return id; } -/* +/** find a pointer value previously set with idr_get_new given an id */ -void *idr_find(struct idr_context *idp, int id) +_PUBLIC_ void *idr_find(struct idr_context *idp, int id) { return _idr_find(idp, id); } -/* +/** remove an id from the idr tree */ -int idr_remove(struct idr_context *idp, int id) +_PUBLIC_ int idr_remove(struct idr_context *idp, int id) { int ret; ret = _idr_remove((struct idr_context *)idp, id); |