From 871054f08e062f44ed668a2ae6b4df6500f54672 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 15 May 2011 11:23:22 +0200 Subject: [PATCH] remove SCM_I_SIZE limits defines * libguile/__scm.h: Remove defines for SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, and SCM_I_SSIZE_MAX, as there is no longer a scm_t_size / scm_size_t type. * libguile/bytevectors.c (make_bytevector): Replace a use of SCM_I_SIZE_MAX with ((size_t) -1). --- libguile/__scm.h | 4 ---- libguile/bytevectors.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/libguile/__scm.h b/libguile/__scm.h index d71982c07..518799ed0 100644 --- a/libguile/__scm.h +++ b/libguile/__scm.h @@ -324,10 +324,6 @@ #define SCM_T_INTPTR_MIN SCM_I_TYPE_MIN(scm_t_intptr,SCM_T_UINTPTR_MAX) #define SCM_T_INTPTR_MAX SCM_I_TYPE_MAX(scm_t_intptr,SCM_T_UINTPTR_MAX) -#define SCM_I_SIZE_MAX SCM_I_UTYPE_MAX(size_t) -#define SCM_I_SSIZE_MIN SCM_I_TYPE_MIN(ssize_t,SCM_I_SIZE_MAX) -#define SCM_I_SSIZE_MAX SCM_I_TYPE_MAX(ssize_t,SCM_I_SIZE_MAX) - #include "libguile/tags.h" diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c index b9403ea5b..90252a7a0 100644 --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -213,7 +213,7 @@ make_bytevector (size_t len, scm_t_array_element_type element_type) if (SCM_UNLIKELY (element_type > SCM_ARRAY_ELEMENT_TYPE_LAST || scm_i_array_element_type_sizes[element_type] < 8 - || len >= (SCM_I_SIZE_MAX + || len >= (((size_t) -1) / (scm_i_array_element_type_sizes[element_type]/8)))) /* This would be an internal Guile programming error */ abort (); -- 2.20.1