[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #573: types.db: "allocate" can return false, not just
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #573: types.db: "allocate" can return false, not just pointers |
Date: |
Tue, 10 May 2011 13:03:08 -0000 |
#573: types.db: "allocate" can return false, not just pointers
-------------------------------+--------------------------------------------
Reporter: sjamaan | Owner: felix
Type: defect | Status: new
Priority: not urgent at all | Milestone: 4.7.0
Component: compiler | Version: 4.6.x
Keywords: |
-------------------------------+--------------------------------------------
{{{(allocate -1) => #f}}}
But when I do {{{(let ((x (allocate y))) (unless x (error "allocation
problem")))}}} I get a compiler warning:
{{{
Warning: in toplevel procedure `freetds#make-CS_BINARY*':
expected value of type boolean in conditional but were given a value of
type `pointer' which is always true:
}}}
I think types.db needs a small tweak to accommodate null pointers.
Probably something like this:
{{{(allocate (procedure allocate (fixnum) (or pointer boolean)))}}}
--
Ticket URL: <https://bugs.call-cc.org/ticket/573>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #573: types.db: "allocate" can return false, not just pointers,
Chicken Trac <=