remove dict.h

This commit is contained in:
Yuichi Nishiwaki 2016-02-19 00:40:35 +09:00
parent 387ba469c8
commit 0243c52b14
4 changed files with 13 additions and 26 deletions

View File

@ -3,6 +3,7 @@
*/
#include "picrin.h"
#include "picrin/object.h"
KHASH_DEFINE(dict, pic_sym *, pic_value, kh_ptr_hash_func, kh_ptr_hash_equal)

View File

@ -261,7 +261,6 @@ int pic_str_hash(pic_state *, struct pic_string *);
#include "picrin/cont.h"
#include "picrin/data.h"
#include "picrin/dict.h"
#include "picrin/error.h"
#include "picrin/macro.h"
#include "picrin/pair.h"

View File

@ -1,25 +0,0 @@
/**
* See Copyright Notice in picrin.h
*/
#ifndef PICRIN_DICT_H
#define PICRIN_DICT_H
#if defined(__cplusplus)
extern "C" {
#endif
KHASH_DECLARE(dict, pic_sym *, pic_value)
struct pic_dict {
PIC_OBJECT_HEADER
khash_t(dict) hash;
};
#define pic_dict_ptr(v) ((struct pic_dict *)pic_obj_ptr(v))
#if defined(__cplusplus)
}
#endif
#endif

View File

@ -44,6 +44,18 @@ struct pic_vector {
#define pic_vec_ptr(o) ((struct pic_vector *)pic_obj_ptr(o))
/* dictionary */
KHASH_DECLARE(dict, pic_sym *, pic_value)
struct pic_dict {
PIC_OBJECT_HEADER
khash_t(dict) hash;
};
#define pic_dict_ptr(v) ((struct pic_dict *)pic_obj_ptr(v))
/* weak */
KHASH_DECLARE(weak, void *, pic_value)