add picrin/object.h
This commit is contained in:
parent
0a715e4916
commit
3dd8290dd3
|
@ -3,6 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "picrin.h"
|
#include "picrin.h"
|
||||||
|
#include "picrin/object.h"
|
||||||
|
|
||||||
union header {
|
union header {
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -271,7 +271,6 @@ int pic_str_hash(pic_state *, struct pic_string *);
|
||||||
#include "picrin/string.h"
|
#include "picrin/string.h"
|
||||||
#include "picrin/symbol.h"
|
#include "picrin/symbol.h"
|
||||||
#include "picrin/vector.h"
|
#include "picrin/vector.h"
|
||||||
#include "picrin/weak.h"
|
|
||||||
|
|
||||||
void *pic_default_allocf(void *, void *, size_t);
|
void *pic_default_allocf(void *, void *, size_t);
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
* See Copyright Notice in picrin.h
|
* See Copyright Notice in picrin.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PICRIN_WEAK_H
|
#ifndef PICRIN_OBJECT_H
|
||||||
#define PICRIN_WEAK_H
|
#define PICRIN_OBJECT_H
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -19,6 +19,7 @@ struct pic_weak {
|
||||||
|
|
||||||
#define pic_weak_ptr(v) ((struct pic_weak *)pic_obj_ptr(v))
|
#define pic_weak_ptr(v) ((struct pic_weak *)pic_obj_ptr(v))
|
||||||
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
|
@ -3,6 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "picrin.h"
|
#include "picrin.h"
|
||||||
|
#include "picrin/object.h"
|
||||||
|
|
||||||
static pic_value
|
static pic_value
|
||||||
var_get(pic_state *pic, struct pic_proc *var)
|
var_get(pic_state *pic, struct pic_proc *var)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "picrin.h"
|
#include "picrin.h"
|
||||||
|
#include "picrin/object.h"
|
||||||
|
|
||||||
KHASH_DEFINE(weak, void *, pic_value, kh_ptr_hash_func, kh_ptr_hash_equal)
|
KHASH_DEFINE(weak, void *, pic_value, kh_ptr_hash_func, kh_ptr_hash_equal)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue