This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Names in libguile
- To: dirk at ida dot ing dot tu-bs dot de
- Subject: Names in libguile
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: Thu, 16 Mar 2000 18:38:26 +0100
- Cc: guile at sourceware dot cygnus dot com
- Reply-to: Mikael Djurfeldt <djurfeldt at nada dot kth dot se>
Regarding names in libguile, I think we should use these principles:
The C names for Scheme primitives *always* obey a fixed name
translation scheme:
scm_XXX where XXX is translated from the Scheme name, except that
- becomes _
! becomes _x
? becomes _p
% becomes sys_
If there's a C variant of something provided at the Scheme level (like
the current scm_internal_dynamic_wind), it has the prefix scm_c_
instead of scm_.
If there's a C function with global scope which is only intended to be
used internally in libguile, it has the prefix scm_i_.
String literals with global scope has the prefix scm_s_. (Greg
introduced the prefix s_scm_ but this has to change to scm_s_ since
s_scm_ trespasses the user's namespace.)
Keywords with global scope has the prefix scm_k_.
Symbols with global scope has the prefix scm_sym_.
Variable bindings with global scope has the prefix scm_var_.
(What have I forgotten?)