~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/windows/identity/util/hashtable.h

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman, Russ Allbery, Sam Hartman
  • Date: 2008-08-21 10:41:41 UTC
  • mfrom: (11.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080821104141-a0f9c4o4cpo8xd0o
Tags: 1.6.dfsg.4~beta1-4
[ Russ Allbery ]
* Translation updates:
  - Swedish, thanks Martin Bagge.  (Closes: #487669, #491774)
  - Italian, thanks Luca Monducci.  (Closes: #493962)

[ Sam Hartman ]
* Translation Updates:
    - Dutch, Thanks Vincent Zweije, Closes: #495733

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
 
84
84
typedef struct tag_hash_bin {
85
85
    void * data;
86
 
    void * key;
 
86
    const void * key;
87
87
 
88
88
    LDCL(struct tag_hash_bin);
89
89
} hash_bin;
147
147
    \note Not thread-safe.  Applications must serialize calls that
148
148
        reference the same hashtable.
149
149
 */
150
 
KHMEXP void KHMAPI hash_add(hashtable * h, void * key, void * data);
 
150
KHMEXP void KHMAPI hash_add(hashtable * h, const void * key, void * data);
151
151
 
152
152
/*! \brief Delete an object from a hashtable
153
153
 
161
161
    \note Not thread-safe.  Applications must serialize calls that
162
162
        reference the same hashtable.
163
163
 */
164
 
KHMEXP void KHMAPI hash_del(hashtable * h, void * key);
 
164
KHMEXP void KHMAPI hash_del(hashtable * h, const void * key);
165
165
 
166
166
/*! \brief Resolve and association
167
167
 
175
175
    \note Not thread-safe.  Applications must serialize calls that
176
176
        reference the same hashtable.
177
177
 */
178
 
KHMEXP void * KHMAPI hash_lookup(hashtable * h, void * key);
 
178
KHMEXP void * KHMAPI hash_lookup(hashtable * h, const void * key);
179
179
 
180
180
/*! \brief Check for the presence of an association
181
181
 
190
190
    \note Not thead-safe.  Application must serialize calls that
191
191
        reference the same hashtable.
192
192
 */
193
 
KHMEXP khm_boolean KHMAPI hash_exist(hashtable * h, void * key);
 
193
KHMEXP khm_boolean KHMAPI hash_exist(hashtable * h, const void * key);
194
194
 
195
195
/*! \brief Compute a hashvalue for a unicode string
196
196
 
202
202
 
203
203
    \param[in] str A pointer to a NULL terminated wchar_t string cast
204
204
        as (void *).
 
205
 
 
206
    \note This function does not check the length of the string \a
 
207
        str.  If the string is not \a NULL terminated, the behavior is
 
208
        undefined.
205
209
 */
206
210
KHMEXP khm_int32 hash_string(const void *str);
207
211
 
214
218
        as (void *).
215
219
    \param[in] vs2 A pointer to a NULL terminated wchar_t string cast
216
220
        as (void *).
 
221
 
 
222
    \note This function does not check the length of the strings \a
 
223
        vs1 and \a vs2.  If the strings are not NULL terminated, the
 
224
        behavior is undefined.
217
225
 */
218
226
KHMEXP khm_int32 hash_string_comp(const void *vs1, const void *vs2);
219
227