[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] [patch] write-string fails to check type of its params
From: |
Alejandro Forero Cuervo |
Subject: |
[Chicken-users] [patch] write-string fails to check type of its params |
Date: |
Mon, 17 May 2004 17:30:02 -0500 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
The following (broken) code, when compiled, gives a strange error:
> (declare (uses extras))
> (write-string "hey" (open-output-file "/tmp/foo"))
I get:
> Error: (make-string) size is negative: -536889320
Evidently, make-string is failing to check that its optional NUM
parameter is a fixnum.
Enclosed is a patch to have it perform the check (made against
1.45, but excluding the changes in extras.c from it; that means
extras.c needs to be regenerated after the patch is applied).
With the patch, the above code gives:
> Error: (write-string) bad argument type - not a fixnum: #<output port
> /tmp/foo>
Took me a while to figure out what was going on. :)
Thanks.
Alejo.
http://bachue.com/alejo
---=( Comunidad de Usuarios de Software Libre en Colombia )=---
---=( http://bachue.com/colibri )=--=( address@hidden )=---
patch
Description: Text document
signature.asc
Description: Digital signature
- [Chicken-users] aixy batmr, Beulah Montoya, 2004/05/17
- [Chicken-users] [patch] write-string fails to check type of its params,
Alejandro Forero Cuervo <=