Compare commits

...
1 Commits
2 changed files with 10 additions and 3 deletions

No files matched your search

+2 -2
View File
@@ -1168,8 +1168,8 @@ void VS_Print(vsbuf_t *buf, const char *data)
#define NAME cvar_map_t
#define KEY_TY const char *
#define VAL_TY consvar_t *
#define HASH_FN vt_hash_string
#define CMPR_FN vt_cmpr_string
#define HASH_FN FNV1a_HashLowercaseString
#define CMPR_FN vt_cmpr_casestring
#include "verstable.h"
#define NAME netvar_map_t
+8 -1
View File
@@ -462,6 +462,8 @@ License (MIT):
#include <stdbool.h>
#include <string.h>
#include "fastcmp.h"
// Two-way concatenation macro.
#define VT_CAT_( a, b ) a##b
#define VT_CAT( a, b ) VT_CAT_( a, b )
@@ -705,7 +707,12 @@ static inline FORCE_INLINE bool vt_cmpr_integer( uint64_t key_1, uint64_t key_2
static inline FORCE_INLINE bool vt_cmpr_string( const char *key_1, const char *key_2 )
{
return strcmp( key_1, key_2 ) == 0;
return fastcmp( key_1, key_2 );
}
static inline FORCE_INLINE bool vt_cmpr_casestring( const char *key_1, const char *key_2 )
{
return fasticmp( key_1, key_2 );
}
// Default allocation and free functions.