return 0;
}
-#if defined(_MSC_VER) && (_MSC_VER < 1900)
-unsigned long lh_get_hash(const struct lh_table *t, const void *k)
-{
- return t->hash_fn(k);
-}
-#endif
-
void lh_table_free(struct lh_table *t)
{
struct lh_entry *c;
int lh_table_resize(struct lh_table *t, int new_size);
+#if !defined(_MSC_VER) || (_MSC_VER > 1800)
+/* VS2010 can't handle inline funcs, so skip it there */
+#define _LH_INLINE inline
+#else
+#define _LH_INLINE
+#endif
+
/**
* Calculate the hash of a key for a given table.
* This is an exension to support functions that need to calculate
* @param k a pointer to the key to lookup
* @return the key's hash
*/
-#if !defined(_MSC_VER) || (_MSC_VER > 1800)
-static inline unsigned long lh_get_hash(const struct lh_table *t, const void *k)\r
-{\r
- return t->hash_fn(k);\r
+static _LH_INLINE unsigned long lh_get_hash(const struct lh_table *t, const void *k)
+{
+ return t->hash_fn(k);
}
-#else
-unsigned long lh_get_hash(const struct lh_table *t, const void *k);
-#endif
+
+#undef _LH_INLINE
/* Don't use this outside of linkhash.h: */
#ifdef __UNCONST
#define _LH_UNCONST(a) __UNCONST(a)
-#else\r
+#else
#define _LH_UNCONST(a) ((void *)(uintptr_t)(const void *)(a))
#endif