Re: proposal: scm_c_public_ref et al

2011-03-07 Thread Andy Wingo
On Sun 06 Mar 2011 23:22, l...@gnu.org (Ludovic Courtès) writes: > Hi! > > Andy Wingo writes: > >> SCM scm_public_lookup (SCM module_name, SCM sym); >> SCM scm_private_lookup (SCM module_name, SCM sym); >> >> Look up a variable bound to SYM in the module named MODULE_NAME. If >>

Re: proposal: scm_c_public_ref et al

2011-03-06 Thread Andy Wingo
On Sun 06 Mar 2011 17:24, Mark H Weaver writes: > Andy Wingo writes: >> SCM scm_c_public_lookup (const char *module_name, const char *name); >> SCM scm_c_private_lookup (const char *module_name, const char *name); >> SCM scm_c_public_ref (const char *module_name, const char *name); >

Re: proposal: scm_c_public_ref et al

2011-03-06 Thread Ludovic Courtès
Hi! Andy Wingo writes: > SCM scm_public_lookup (SCM module_name, SCM sym); > SCM scm_private_lookup (SCM module_name, SCM sym); > > Look up a variable bound to SYM in the module named MODULE_NAME. If > the module does not exist or the symbol is unbound, signal an > error. T

Re: proposal: scm_c_public_ref et al

2011-03-06 Thread Andy Wingo
Hello, On Sun 06 Mar 2011 18:10, Thien-Thi Nguyen writes: > () Mark H Weaver > () Sun, 06 Mar 2011 11:24:33 -0500 > >Maybe utf8 is a better choice? > > A module name is a list of symbols, so why not use that from the beginning? The variants without _c_ did just that, so no problem there.

Re: proposal: scm_c_public_ref et al

2011-03-06 Thread Thien-Thi Nguyen
() Mark H Weaver () Sun, 06 Mar 2011 11:24:33 -0500 Maybe utf8 is a better choice? A module name is a list of symbols, so why not use that from the beginning? If the process of converting "ice-9 common-list" into (ice-9 common-list) must happen somewhere, it would be nice if it could happen e

Re: proposal: scm_c_public_ref et al

2011-03-06 Thread Mark H Weaver
Andy Wingo writes: > SCM scm_c_public_lookup (const char *module_name, const char *name); > SCM scm_c_private_lookup (const char *module_name, const char *name); > SCM scm_c_public_ref (const char *module_name, const char *name); > SCM scm_c_private_ref (const char *module_name, co

proposal: scm_c_public_ref et al

2011-03-06 Thread Andy Wingo
Hey all, As we move more and more to writing code in Scheme and not in C, it becomes apparent that it is more cumbersome to reference Scheme values than it should be. I propose that we add helper C APIs like these: SCM scm_public_lookup (SCM module_name, SCM sym); SCM scm_private_lookup