151 |
|
|
152 |
Note that you can use @code{gh_repl} inside @code{gh_enter} (in other |
Note that you can use @code{gh_repl} inside @code{gh_enter} (in other |
153 |
words, inside the code for @code{main-prog}) if you want the program to |
words, inside the code for @code{main-prog}) if you want the program to |
154 |
be controled by a Scheme read-eval-print loop. |
be controlled by a Scheme read-eval-print loop. |
155 |
@end deftypefun |
@end deftypefun |
156 |
|
|
157 |
@cindex read eval print loop -- from the gh_ interface |
@cindex read eval print loop -- from the gh_ interface |
328 |
|
|
329 |
First of all the C routine has to return type @code{SCM}. |
First of all the C routine has to return type @code{SCM}. |
330 |
|
|
331 |
Second, all arguments passed to the C funcion will be of type |
Second, all arguments passed to the C function will be of type |
332 |
@code{SCM}. |
@code{SCM}. |
333 |
|
|
334 |
Third: the C routine is now subject to Scheme flow control, which means |
Third: the C routine is now subject to Scheme flow control, which means |
342 |
|
|
343 |
@defmac GH_DEFER_INTS |
@defmac GH_DEFER_INTS |
344 |
@defmacx GH_ALLOW_INTS |
@defmacx GH_ALLOW_INTS |
345 |
These macros disable and reenable Scheme's flow control. They |
These macros disable and re-enable Scheme's flow control. They |
346 |
@end defmac |
@end defmac |
347 |
|
|
348 |
|
|
725 |
value)} @code{(vector-length v)} @code{(list->vector ls)} procedures. |
value)} @code{(vector-length v)} @code{(list->vector ls)} procedures. |
726 |
|
|
727 |
The correspondence is not perfect for @code{gh_vector}: this routine |
The correspondence is not perfect for @code{gh_vector}: this routine |
728 |
taks a list @var{ls} instead of the individual list elements, thus |
takes a list @var{ls} instead of the individual list elements, thus |
729 |
making it identical to @code{gh_list_to_vector}. |
making it identical to @code{gh_list_to_vector}. |
730 |
|
|
731 |
There is also a difference in gh_vector_length: the value returned is a |
There is also a difference in gh_vector_length: the value returned is a |
811 |
|
|
812 |
Look up a symbol with a given name, and return the object to which |
Look up a symbol with a given name, and return the object to which |
813 |
it is bound. gh_lookup examines the Guile top level, and |
it is bound. gh_lookup examines the Guile top level, and |
814 |
gh_module_lookup checks the module namespace specified by the |
gh_module_lookup checks the module name space specified by the |
815 |
`vec' argument. |
`vec' argument. |
816 |
|
|
817 |
The return value is the Scheme object to which SNAME is bound, or |
The return value is the Scheme object to which SNAME is bound, or |
851 |
@code{-lguile} in your link command. Libtool will expand this into |
@code{-lguile} in your link command. Libtool will expand this into |
852 |
the needed linker options automatically. If you are not using |
the needed linker options automatically. If you are not using |
853 |
libtool, use the @code{guile-config} program to query the needed |
libtool, use the @code{guile-config} program to query the needed |
854 |
options explicitely. A linker command like |
options explicitly. A linker command like |
855 |
|
|
856 |
@smallexample |
@smallexample |
857 |
$(CC) -o prog prog.o `guile-config link` |
$(CC) -o prog prog.o `guile-config link` |