submodule: Fix t7400, t7405, t7406 for msysGit
[git/dscho.git] / vcs-svn / string_pool.txt
blob1b41f156288e03fc6051af28402fcc1ea90c67db
1 string_pool API
2 ===============
4 The string_pool API provides facilities for replacing strings
5 with integer keys that can be more easily compared and stored.
6 The facilities are designed so that one could teach Git without
7 too much trouble to store the information needed for these keys to
8 remain valid over multiple executions.
10 Functions
11 ---------
13 pool_intern::
14         Include a string in the string pool and get its key.
15         If that string is already in the pool, retrieves its
16         existing key.
18 pool_fetch::
19         Retrieve the string associated to a given key.
21 pool_tok_r::
22         Extract the key of the next token from a string.
23         Interface mimics strtok_r.
25 pool_print_seq::
26         Print a sequence of strings named by key to a file, using the
27         specified delimiter to separate them.
29         If NULL (key ~0) appears in the sequence, the sequence ends
30         early.
32 pool_tok_seq::
33         Split a string into tokens, storing the keys of segments
34         into a caller-provided array.
36         Unless sz is 0, the array will always be ~0-terminated.
37         If there is not enough room for all the tokens, the
38         array holds as many tokens as fit in the entries before
39         the terminating ~0.  Return value is the index after the
40         last token, or sz if the tokens did not fit.
42 pool_reset::
43         Deallocate storage for the string pool.