/* Return 1 if 'key' exists in the dict, 0 otherwise  */
int qdict_haskey(const QDict *qdict, const char *key)
/* Return 1 if 'key' exists in the dict, 0 otherwise  */
int qdict_haskey(const QDict *qdict, const char *key)
{
    unsigned int bucket = tdb_hash(key) % QDICT_BUCKET_MAX;
    return (qdict_find(qdict, key, bucket) == NULL ? 0 : 1);
}