1 | /* |
1 | /* |
2 | * static char *rcsid_shstr_c = |
2 | * static char *rcsid_shstr_c = |
3 | * "$Id: shstr.c,v 1.1.1.2 2006/03/15 14:04:38 elmex Exp $"; |
3 | * "$Id: shstr.c,v 1.2 2006/08/13 17:16:01 elmex dead $"; |
4 | * |
4 | * |
5 | * shstr.c |
5 | * shstr.c |
6 | * |
6 | * |
7 | * This is a simple shared strings package with a simple interface. |
7 | * This is a simple shared strings package with a simple interface. |
8 | * |
8 | * |
… | |
… | |
220 | * - length |
220 | * - length |
221 | */ |
221 | */ |
222 | |
222 | |
223 | int |
223 | int |
224 | query_refcount(const char *str) { |
224 | query_refcount(const char *str) { |
225 | return (SS(str)->refcount) & ~TOPBIT; |
225 | return SS(str)->refcount; |
226 | } |
226 | } |
227 | |
227 | |
228 | /* |
228 | /* |
229 | * Description: |
229 | * Description: |
230 | * This will see if str is in the hash table, and return the address |
230 | * This will see if str is in the hash table, and return the address |