chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1011: float and double foreign-lambdas return wr


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1011: float and double foreign-lambdas return wrong values
Date: Mon, 13 May 2013 21:14:31 -0000

#1011: float and double foreign-lambdas return wrong values
----------------------+-----------------------------------------------------
  Reporter:  ecloud   |       Owner:         
      Type:  defect   |      Status:  closed 
  Priority:  major    |   Milestone:  someday
 Component:  unknown  |     Version:  4.8.x  
Resolution:  invalid  |    Keywords:         
----------------------+-----------------------------------------------------
Changes (by ecloud):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 The solution is to declare the C function prototypes, e.g. declare them in
 a header and include it in the scm, or declare them inline.  Despite the
 fact that the foreign-lambda looks like it declares the signature, chicken
 still assumes the return value will be an int unless it has the C function
 prototype.  (This is still a bit of an annoyance, IMO.)

 {{{
 (module getafloat *
    (import ...)
 #>
 #include "impl.h"
 <#
 ...
 )
 }}}

 See also https://lists.gnu.org/archive/html/chicken-
 users/2013-05/msg00045.html

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/1011#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]