X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libhashkit%2Fhashkit.h;h=692d5915ccc3774bc4412230051d3e67fb8ed199;hb=299c04f7d92895d0ec5e1cce437d19b3334b75ac;hp=d4e9d5eacedbd7d39a60a99ac83320a459e6689b;hpb=4cd075fbd0fab78e393c1559db340a221196a006;p=m6w6%2Flibmemcached diff --git a/libhashkit/hashkit.h b/libhashkit/hashkit.h index d4e9d5ea..692d5915 100644 --- a/libhashkit/hashkit.h +++ b/libhashkit/hashkit.h @@ -3,7 +3,6 @@ * HashKit library * * Copyright (C) 2011 Data Differential, http://datadifferential.com/ - * Copyright (C) 2009-2010 Brian Aker All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -38,62 +37,4 @@ #pragma once - -#if !defined(__cplusplus) -# include -#endif -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct hashkit_st -{ - struct hashkit_function_st { - hashkit_hash_fn function; - void *context; - } base_hash, distribution_hash; - - struct { - bool is_base_same_distributed:1; - } flags; - - struct { - bool is_allocated:1; - } options; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -HASHKIT_API -hashkit_st *hashkit_create(hashkit_st *hash); - -HASHKIT_API -hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr); - -HASHKIT_API -bool hashkit_compare(const hashkit_st *first, const hashkit_st *second); - -HASHKIT_API -void hashkit_free(hashkit_st *hash); - -#define hashkit_is_allocated(__object) ((__object)->options.is_allocated) -#define hashkit_is_initialized(__object) ((__object)->options.is_initialized) - - -#define hashkit_success(X) (X) == HASHKIT_SUCCESS -#define hashkit_failed(X) (X) != HASHKIT_SUCCESS - -#ifdef __cplusplus -} // extern "C" -#endif +#include