summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/objects.c5
-rw-r--r--libguile/objects.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/libguile/objects.c b/libguile/objects.c
index e1181745e..e8f647c78 100644
--- a/libguile/objects.c
+++ b/libguile/objects.c
@@ -71,6 +71,7 @@ SCM *scm_port_class = 0;
SCM *scm_smob_class = 0;
SCM (*scm_make_extended_class) (char *type_name);
+void (*scm_make_port_classes) (int ptobnum, char *type_name);
void (*scm_change_object_class) (SCM, SCM, SCM);
/* This function is used for efficient type dispatch. */
@@ -140,8 +141,8 @@ scm_class_of (SCM x)
return scm_class_procedure_with_setter;
case scm_tc7_port:
- return scm_port_class[(SCM_CAR (x) | SCM_WRTNG
- ? (SCM_CAR (x) | SCM_RDNG
+ return scm_port_class[(SCM_WRTNG & SCM_CAR (x)
+ ? (SCM_RDNG & SCM_CAR (x)
? SCM_INOUT_PCLASS_INDEX | SCM_PTOBNUM (x)
: SCM_OUT_PCLASS_INDEX | SCM_PTOBNUM (x))
: SCM_IN_PCLASS_INDEX | SCM_PTOBNUM (x))];
diff --git a/libguile/objects.h b/libguile/objects.h
index 9dc6c2a67..d982cd833 100644
--- a/libguile/objects.h
+++ b/libguile/objects.h
@@ -200,6 +200,7 @@ extern SCM *scm_smob_class;
/* Plugin Goops functions. */
extern SCM (*scm_make_extended_class) (char *type_name);
+extern void (*scm_make_port_classes) (int ptobnum, char *type_name);
extern void (*scm_change_object_class) (SCM, SCM, SCM);
extern void (*scm_memoize_method) (SCM x, SCM args);