1string_pool API 2=============== 3 4The string_pool API provides facilities for replacing strings 5with integer keys that can be more easily compared and stored. 6The facilities are designed so that one could teach Git without 7too much trouble to store the information needed for these keys to 8remain valid over multiple executions. 9 10Functions 11--------- 12 13pool_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. 17 18pool_fetch:: 19 Retrieve the string associated to a given key. 20 21pool_tok_r:: 22 Extract the key of the next token from a string. 23 Interface mimics strtok_r. 24 25pool_print_seq:: 26 Print a sequence of strings named by key to a file, using the 27 specified delimiter to separate them. 28 29 If NULL (key ~0) appears in the sequence, the sequence ends 30 early. 31 32pool_tok_seq:: 33 Split a string into tokens, storing the keys of segments 34 into a caller-provided array. 35 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. 41 42pool_reset:: 43 Deallocate storage for the string pool.