Changeset 34903 in project


Ignore:
Timestamp:
11/22/17 21:02:01 (3 years ago)
Author:
sjamaan
Message:

man/5: Copy (but not move!) return-to-host to Module (chicken platform); leave it in "TODO/Embedding" for now

Location:
wiki/man/5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/5/Module (chicken platform)

    r34261 r34903  
    183183
    184184
     185=== Returning to the host program
     186
     187=== return-to-host
     188
     189<procedure>(return-to-host)</procedure>
     190
     191Exits the Scheme code and returns to the invoking context that called
     192{{CHICKEN_run}} or {{CHICKEN_continue}}.
     193
     194After {{return-to-host}} has been executed and once {{CHICKEN_run}}
     195returns, you can invoke callbacks which have been defined with
     196{{define-external}}.
     197
     198
    185199---
    186200Previous: [[Module (chicken pathname)]]
  • wiki/man/5/TODO/Embedding

    r34052 r34903  
    5656{{toplevel}} is the toplevel entry-point procedure, you usually pass {{C_toplevel}} here.
    5757The result value is the continuation that can be used to re-invoke the Scheme code from the
    58 point after it called {{return-to-host}} (see below).
     58point after it called [[Module (chicken gc)#return-to-host|{{return-to-host}}]].
    5959
    6060If you just need a Scheme interpreter, you can also pass {{CHICKEN_default_toplevel}} as
     
    6666
    6767=== return-to-host
     68
     69TODO: This has been documented under (chicken platform)
     70
     71The {{eval}} library unit also provides boilerplate callbacks, that
     72simplify invoking Scheme code embedded in a C or C++ application:
    6873
    6974<procedure>(return-to-host)</procedure>
     
    161166 % cat x.scm
    162167 ;;; x.scm
     168 (import (chicken platform))
    163169 
    164170 (define (bar x) (gc) (* x x))
     
    235241
    236242 % cat x.scm
    237  (require-extension srfi-18)
     243 (import (chicken platform) srfi-18) ;; Needs the srfi-18 egg
    238244 
    239245 (define m (make-mutex))
Note: See TracChangeset for help on using the changeset viewer.