add picrin/object.h

This commit is contained in:
Yuichi Nishiwaki 2016-02-19 00:03:34 +09:00
parent 0a715e4916
commit 3dd8290dd3
5 changed files with 6 additions and 3 deletions

View File

@ -3,6 +3,7 @@
*/
#include "picrin.h"
#include "picrin/object.h"
union header {
struct {

View File

@ -271,7 +271,6 @@ int pic_str_hash(pic_state *, struct pic_string *);
#include "picrin/string.h"
#include "picrin/symbol.h"
#include "picrin/vector.h"
#include "picrin/weak.h"
void *pic_default_allocf(void *, void *, size_t);

View File

@ -2,8 +2,8 @@
* See Copyright Notice in picrin.h
*/
#ifndef PICRIN_WEAK_H
#define PICRIN_WEAK_H
#ifndef PICRIN_OBJECT_H
#define PICRIN_OBJECT_H
#if defined(__cplusplus)
extern "C" {
@ -19,6 +19,7 @@ struct pic_weak {
#define pic_weak_ptr(v) ((struct pic_weak *)pic_obj_ptr(v))
#if defined(__cplusplus)
}
#endif

View File

@ -3,6 +3,7 @@
*/
#include "picrin.h"
#include "picrin/object.h"
static pic_value
var_get(pic_state *pic, struct pic_proc *var)

View File

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