cisco / ChezScheme

Chez Scheme
Apache License 2.0
6.97k stars 984 forks source link

Invalid foreign-procedure convention __collect_safe #787

Closed mmontone closed 9 months ago

mmontone commented 9 months ago

I get this when I try to use __collect_safe foreign-procedure convention:

Exception: invalid foreign-procedure convention __collect_safe

Even if I try to run the example from: https://cisco.github.io/ChezScheme/csug9.5/foreign.html

(define c-sleep
  (foreign-procedure __collect_safe "sleep" (unsigned) unsigned))
(c-sleep 10) ; sleeps for 10 seconds without blocking other threads
$ chezscheme collect-safe.sls 
Chez Scheme Version 9.5
Copyright 1984-2017 Cisco Systems, Inc.

Exception: invalid foreign-procedure convention __collect_safe at line 2, char 22 of collect-safe.sls

I'm on Linux and Chez version 9.5

melted commented 9 months ago

According to the release notes __collect_safe was added in Chez Scheme 9.5.1. So you might just have a too old version for it to exist.

mmontone commented 9 months ago

You are right. Thank you!