1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00

* objects.h, objects.c (scm_classes_initialized): New.

(scm_class_of): Signal error when scm_classes_initialized is zero.
* goops.c (create_standard_classes): Set scm_classes_initialized
to one.
This commit is contained in:
Marius Vollmer 2005-01-17 19:04:54 +00:00
parent 332036c18a
commit ba96ba4cdc
3 changed files with 7 additions and 0 deletions

View file

@ -78,6 +78,8 @@ SCM scm_class_unknown;
SCM *scm_port_class = 0;
SCM *scm_smob_class = 0;
int scm_classes_initialized = 0;
SCM scm_no_applicable_method;
/* This function is used for efficient type dispatch. */
@ -86,6 +88,9 @@ SCM_DEFINE (scm_class_of, "class-of", 1, 0, 0,
"Return the class of @var{x}.")
#define FUNC_NAME s_scm_class_of
{
if (!scm_classes_initialized)
scm_misc_error (FUNC_NAME, "GOOPS not loaded yet.", SCM_EOL);
switch (SCM_ITAG3 (x))
{
case scm_tc3_int_1: