mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Add `scm_smob_type_class()'.
* libguile/smob.h: * libguile/smob.c (scm_smob_type_class): New function, to access the GOOPS class for a SMOB type.
This commit is contained in:
parent
22c9e769f1
commit
1bbf7f7580
2 changed files with 15 additions and 1 deletions
|
@ -443,6 +443,18 @@ scm_i_new_double_smob (scm_t_bits tc, scm_t_bits data1,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SCM
|
||||||
|
scm_smob_type_class (scm_t_bits tc)
|
||||||
|
{
|
||||||
|
scm_load_goops ();
|
||||||
|
|
||||||
|
return scm_i_smob_class[SCM_TC2SMOBNUM (tc)];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
scm_smob_prehistory ()
|
scm_smob_prehistory ()
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#define SCM_SMOB_H
|
#define SCM_SMOB_H
|
||||||
|
|
||||||
/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2004, 2006, 2009,
|
/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2004, 2006, 2009,
|
||||||
* 2010, 2011, 2012 Free Software Foundation, Inc.
|
* 2010, 2011, 2012, 2015 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
@ -190,6 +190,8 @@ SCM_API void scm_set_smob_apply (scm_t_bits tc,
|
||||||
unsigned int opt,
|
unsigned int opt,
|
||||||
unsigned int rst);
|
unsigned int rst);
|
||||||
|
|
||||||
|
SCM_API SCM scm_smob_type_class (scm_t_bits tc);
|
||||||
|
|
||||||
SCM_API void scm_assert_smob_type (scm_t_bits tag, SCM val);
|
SCM_API void scm_assert_smob_type (scm_t_bits tag, SCM val);
|
||||||
|
|
||||||
/* Function for creating smobs */
|
/* Function for creating smobs */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue