#39 [BUG:39]incorrect handling of floating point types

v0.4.3
closed
nobody
crash (13)
5
2007-05-24
2006-08-06
Tim Burks
No

See the attached test case. It demonstrates the use of
addRubyMethod_withType to set a variety of different signature types. It
is far from exhaustive, but it is sufficient to show several problems.
Neither floats or doubles appear to be bridged correctly. In the case of
floats, the value returned from Ruby to Objective-C is incorrect. For
doubles, the bridge crashes when a double is passed from Objective-C to
Ruby.

Discussion

  • Tim Burks

    Tim Burks - 2006-08-06

    test case

     
  • kimura wataru

    kimura wataru - 2006-08-19
    • summary: incorrect handling of floating point types --> [BUG:39]incorrect handling of floating point types
     
  • kimura wataru

    kimura wataru - 2006-08-19

    Logged In: YES
    user_id=919560

    I think there are three problems.

    (1) incorrect argument value is passed to ruby from objc, when type of the
    argument is float or double
    (2) incorrect return value is passed to objc from ruby, when type of the return
    value is float
    (3) invoking a ruby method defined with ns_override or
    addRubyMethod_withType crashes when return type of the method is double

    I've been trying to fix these problems, but cannot fix yet.

     
  • kimura wataru

    kimura wataru - 2007-05-24

    Logged In: YES
    user_id=919560
    Originator: NO

    This problem was fixed.

     
  • kimura wataru

    kimura wataru - 2007-05-24
    • status: open --> closed
     

Log in to post a comment.