add extern "C" guards; close #126

This commit is contained in:
Yukihiro Matsumoto
2012-05-18 02:02:49 +09:00
parent e67c03529d
commit a4d3579e31
15 changed files with 139 additions and 5 deletions
+12
View File
@@ -4,6 +4,13 @@
** See Copyright Notice in mruby.h
*/
#ifndef KHASH_H
#define KHASH_H
#if defined(__cplusplus)
extern "C" {
#endif
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@@ -203,3 +210,8 @@ typedef const char *kh_cstr_t;
#define KHASH_MAP_INIT_STR(name, khval_t) \
KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str_hash_equal)
#if defined(__cplusplus)
} /* extern "C" { */
#endif
#endif /* KHASH_H */