1 #ifndef SCM_FOREIGN_OBJECT_H
2 #define SCM_FOREIGN_OBJECT_H
4 /* Copyright (C) 2014 Free Software Foundation, Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 3 of
9 * the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 #include "libguile/__scm.h"
25 #include "libguile/print.h"
30 SCM_API SCM
scm_make_foreign_object_type (SCM name
, SCM slot_names
,
31 scm_t_struct_finalize finalizer
);
33 SCM_API
void scm_assert_foreign_object_type (SCM type
, SCM val
);
35 SCM_API SCM
scm_make_foreign_object_1 (SCM type
, scm_t_bits val0
);
36 SCM_API SCM
scm_make_foreign_object_2 (SCM type
, scm_t_bits val0
,
38 SCM_API SCM
scm_make_foreign_object_3 (SCM type
, scm_t_bits val0
,
39 scm_t_bits val1
, scm_t_bits val2
);
40 SCM_API SCM
scm_make_foreign_object_n (SCM type
, size_t n
, scm_t_bits vals
[]);
42 SCM_API scm_t_bits
scm_foreign_object_ref (SCM obj
, size_t n
);
43 SCM_API
void scm_foreign_object_set_x (SCM obj
, size_t n
, scm_t_bits val
);
45 SCM_INTERNAL
void scm_register_foreign_object (void);
48 #endif /* SCM_FOREIGN_OBJECT_H */