1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-06 15:40:29 +02:00

Publish the maximum number of port types as `SCM_I_MAX_PORT_TYPE_COUNT'.

* libguile/goops.c (create_port_classes): Use
  `SCM_I_MAX_PORT_TYPE_COUNT' instead of a hard-wired 256.

* libguile/objects.h (SCM_OUT_PCLASS_INDEX, SCM_INOUT_PCLASS_INDEX):
  Likewise.

* libguile/ports.c (scm_make_port_type): Likewise.

* libguile/ports.h (SCM_I_MAX_PORT_TYPE_COUNT): New macro.
This commit is contained in:
Ludovic Courtès 2009-01-18 18:47:20 +01:00
parent 474554694f
commit 0953b54946
4 changed files with 14 additions and 10 deletions

View file

@ -3,7 +3,7 @@
#ifndef SCM_OBJECTS_H
#define SCM_OBJECTS_H
/* Copyright (C) 1996,1999,2000,2001, 2003, 2006, 2008 Free Software Foundation, Inc.
/* Copyright (C) 1996,1999,2000,2001, 2003, 2006, 2008, 2009 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -171,9 +171,9 @@ typedef struct scm_effective_slot_definition {
#define SCM_CMETHOD_ENV(cmethod) SCM_CAR (cmethod)
/* Port classes */
#define SCM_IN_PCLASS_INDEX 0x000
#define SCM_OUT_PCLASS_INDEX 0x100
#define SCM_INOUT_PCLASS_INDEX 0x200
#define SCM_IN_PCLASS_INDEX 0
#define SCM_OUT_PCLASS_INDEX SCM_I_MAX_PORT_TYPE_COUNT
#define SCM_INOUT_PCLASS_INDEX (2 * SCM_I_MAX_PORT_TYPE_COUNT)
/* Plugin proxy classes for basic types. */
SCM_API SCM scm_metaclass_standard;