From 2103c65b3d52e94d40a1dcba2bf1ffd82e800802 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 15 Feb 2007 20:39:17 +0000 Subject: [PATCH] make-cvector with 0 args svn: r5619 original commit: 492733aa40a6b73bb7adbbcba89ec8afa9b11eec --- collects/mzlib/foreign.ss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/mzlib/foreign.ss b/collects/mzlib/foreign.ss index 6a869b8..1be15f7 100644 --- a/collects/mzlib/foreign.ss +++ b/collects/mzlib/foreign.ss @@ -961,8 +961,9 @@ (provide (rename allocate-cvector make-cvector)) (define (allocate-cvector type len) - (let ([cblock (malloc len type)]) - (make-cvector cblock type len))) + (make-cvector (if (zero? len) #f ; 0 => NULL + (malloc len type)) + type len)) (provide (rename cvector-args cvector)) (define (cvector-args type . args)