Changeset 36224 in project


Ignore:
Timestamp:
08/12/18 20:01:54 (8 days ago)
Author:
kooda
Message:

Porting guide: add a few sections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/porting-c4-to-c5

    r36106 r36224  
    408408</enscript>
    409409
     410==== FFI integers arguments require fixnum or bignum values
     411
     412Now that support for the full numeric tower, support for floating point
     413values behaving like integers has been removed. The FFI layer does not
     414convert flonum to integers when passing them as arguments to C functions
     415any longer.
     416
     417<enscript highlight="scheme">
     418;; As an example:
     419
     420 ;; might come from an external library, like JSON parsing (where every number is floating point)
     421(define milliseconds-time 1534096420492.0)
     422
     423;; CHICKEN 4 way
     424; (seconds->local-time (/ milliseconds-time 1000))
     425
     426;; CHICKEN 5 way
     427(seconds->local-time (inexact->exact (round (/ milliseconds-time 1000))))
     428</enscript>
     429
     430==== Linking to external libraries
     431
     432In CHICKEN 5, the {{-l}} flag was removed, you now have to use {{-L -llib}}.
     433
     434For example:
     435<enscript highlight="sh">
     436# Something compiled like so:
     437csc program.scm -lncurses
     438# Would now be compiled like this:
     439csc program.scm -L -lncurses
     440</enscript>
    410441
    411442=== Re-packaging eggs
Note: See TracChangeset for help on using the changeset viewer.