guile-user
[Top][All Lists]
Advanced

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

Re: scm_with_continuation_barrier returning #f on throws ?


From: Andy Wingo
Subject: Re: scm_with_continuation_barrier returning #f on throws ?
Date: Sat, 25 Sep 2010 16:36:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi Cedric,

On Mon 06 Sep 2010 13:20, Cedric Cellier <address@hidden> writes:

> SCM res = scm_with_guile(load_file, "a_file_that_doesnt_exist");

This statement is ill-formed, because you shouldn't have references to
SCM objects outside of Guile. This is indicated by scm_with_guile's
return value, which is void* and not SCM.

The docs about scm_with_continuation_barrier are correct; it does indeed
return #f on a throw. But scm_with_guile uses
scm_c_with_continuation_barrier, which is different, because it returns
a C value, a void*. The error case there has it return NULL.

Regards,

Andy
-- 
http://wingolog.org/



reply via email to

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