guile-user
[Top][All Lists]
Advanced

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

Re: [guile/scwm] 2nd argument problem to scm_definedp()


From: Marius Vollmer
Subject: Re: [guile/scwm] 2nd argument problem to scm_definedp()
Date: 16 Sep 2002 21:42:01 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

P Pareit <address@hidden> writes:

> The c-code that modifies %load-path looks like creating %load-path
> in stead of adding strings to %load-path.

Can you show that code?

> I would first like to know if %load-path is 
> already defined, in scheme code this would be: (and (defined? %load-path) 
> (display "%load-path is defined") (newline)), it seems I cannot get the 
> argument for _current_lexical_environment_ right:

If you want to default an optional argument from C, use SCM_UNDEFINED:

  if (SCM_NFALSEP (scm_definedp (load_path_symbol, SCM_UNDEFINED)))
    ...

I guess you want the default.  If not, things get messy.  The lexical
environment that definedp expects is the data structure that gets
passed as the second argument to macro transformers.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

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