[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: get procedure?
From: |
dsmich |
Subject: |
Re: get procedure? |
Date: |
Wed, 17 Feb 2010 19:54:15 +0000 |
---- Thomas Thiriez <address@hidden> wrote:
> Hi Paul,
>
> Here is what you should use for xxx:
>
> SCM FindFunc(const char *funcName)
> {
> SCM funcSymbol = scm_c_lookup(funcName);
>
> if (!funcSymbol)
> // undefined symbol
> return 0;
>
> return scm_variable_ref(funcSymbol);
> }
Oi!
Never ever ever let 0 be turned loose to Guile as a SCM value. Segfaults will
happen!
Also, funcSymbol will never be 0 (or madness would ensue).
-Dale