diff options
author | Karel Zak | 2014-11-26 11:21:16 +0100 |
---|---|---|
committer | Karel Zak | 2014-11-26 11:21:16 +0100 |
commit | 7ab7af75786c519eb64e7a9257b9bd95dd0cd1fd (patch) | |
tree | efa59eab946dfa6f333b2f956029925ca9716543 /libfdisk/src/iter.c | |
parent | libfdisk: add docs for init functions (diff) | |
download | kernel-qcow2-util-linux-7ab7af75786c519eb64e7a9257b9bd95dd0cd1fd.tar.gz kernel-qcow2-util-linux-7ab7af75786c519eb64e7a9257b9bd95dd0cd1fd.tar.xz kernel-qcow2-util-linux-7ab7af75786c519eb64e7a9257b9bd95dd0cd1fd.zip |
libfdisk: add docs for iterator
Diffstat (limited to 'libfdisk/src/iter.c')
-rw-r--r-- | libfdisk/src/iter.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libfdisk/src/iter.c b/libfdisk/src/iter.c index 8e2f34202..9a0b0801c 100644 --- a/libfdisk/src/iter.c +++ b/libfdisk/src/iter.c @@ -10,8 +10,17 @@ * @title: Iterator * @short_description: unified iterator * - * The iterator keeps the direction and the last position - * for access to the internal library tables/lists. + * The iterator keeps the direction and the last position for access to the + * internal library tables/lists. + * + * It's very unusual to use the same iterator on multiple places in your + * application or share the same iterator, for this purpose libfdisk does not + * provide reference counting for this object. It's recommended to initialize + * the iterator by fdisk_new_iter() at begin of your function and then + * fdisk_free_iter() before you return from the function. + * + * Don't forget to call fdisk_reset_iter() if you want to use the iterator more + * than once. */ #include <stdio.h> #include <string.h> |