mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
* gh.texi, data-rep.texi: Moved `@deftyp {Data type} SCM' line
from gh.texi to data-rep.texi. Both files already had similar descriptions for SCM. Given that gh.texi is deprecated, looking up `SCM' in the index should take one to the primary location rather than deprecated section. Hence this change. Added `@deftp' for scm_t_bits data type so that a proper index entry is added for this. Thanks to Richard Y. Kim! * data-rep.texi (Subrs): Changed scm_make_gsubr to scm_c_define_gsubr. Thanks to Richard Y. Kim!
This commit is contained in:
parent
c1855462dd
commit
8655bfe784
2 changed files with 11 additions and 12 deletions
|
@ -46,7 +46,7 @@
|
||||||
@c essay @sp 10
|
@c essay @sp 10
|
||||||
@c essay @comment The title is printed in a large font.
|
@c essay @comment The title is printed in a large font.
|
||||||
@c essay @title Data Representation in Guile
|
@c essay @title Data Representation in Guile
|
||||||
@c essay @subtitle $Id: data-rep.texi,v 1.1.2.4 2002-03-12 20:51:25 ossau Exp $
|
@c essay @subtitle $Id: data-rep.texi,v 1.1.2.5 2002-04-28 14:53:21 mvo Exp $
|
||||||
@c essay @subtitle For use with Guile @value{VERSION}
|
@c essay @subtitle For use with Guile @value{VERSION}
|
||||||
@c essay @author Jim Blandy
|
@c essay @author Jim Blandy
|
||||||
@c essay @author Free Software Foundation
|
@c essay @author Free Software Foundation
|
||||||
|
@ -980,7 +980,8 @@ Return the name of the subr @var{x}. The result is undefined if
|
||||||
@var{x} is not a subr.
|
@var{x} is not a subr.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
@deftypefun SCM scm_make_gsubr (char *@var{name}, int @var{req}, int @var{opt}, int @var{rest}, SCM (*@var{function})())
|
@c This used to be scm_make_gsubr which is now deprecated.
|
||||||
|
@deftypefun SCM scm_c_define_gsubr (char *@var{name}, int @var{req}, int @var{opt}, int @var{rest}, SCM (*@var{function})())
|
||||||
Create a new subr object named @var{name}, based on the C function
|
Create a new subr object named @var{name}, based on the C function
|
||||||
@var{function}, make it visible to Scheme the value of as a global
|
@var{function}, make it visible to Scheme the value of as a global
|
||||||
variable named @var{name}, and return the subr object.
|
variable named @var{name}, and return the subr object.
|
||||||
|
@ -1005,8 +1006,8 @@ combinations of required, optional, and rest arguments. For example, a
|
||||||
subr can take one required argument, or one required and one optional
|
subr can take one required argument, or one required and one optional
|
||||||
argument, but a subr can't take one required and two optional arguments.
|
argument, but a subr can't take one required and two optional arguments.
|
||||||
It's bizarre, but that's the way the interpreter was written. If the
|
It's bizarre, but that's the way the interpreter was written. If the
|
||||||
arguments to @code{scm_make_gsubr} do not fit one of the predefined
|
arguments to @code{scm_c_define_gsubr} do not fit one of the predefined
|
||||||
patterns, then @code{scm_make_gsubr} will return a compiled closure
|
patterns, then @code{scm_c_define_gsubr} will return a compiled closure
|
||||||
object instead of a subr object.
|
object instead of a subr object.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
|
@ -1067,22 +1068,23 @@ represented and used at the C level.
|
||||||
|
|
||||||
In fact, there are two basic C data types to represent objects in Guile:
|
In fact, there are two basic C data types to represent objects in Guile:
|
||||||
|
|
||||||
@itemize @bullet
|
@deftp {Data type} SCM
|
||||||
@item
|
|
||||||
@code{SCM} is the user level abstract C type that is used to represent
|
@code{SCM} is the user level abstract C type that is used to represent
|
||||||
all of Guile's Scheme objects, no matter what the Scheme object type is.
|
all of Guile's Scheme objects, no matter what the Scheme object type is.
|
||||||
No C operation except assignment is guaranteed to work with variables of
|
No C operation except assignment is guaranteed to work with variables of
|
||||||
type @code{SCM}, so you should only use macros and functions to work
|
type @code{SCM}, so you should only use macros and functions to work
|
||||||
with @code{SCM} values. Values are converted between C data types and
|
with @code{SCM} values. Values are converted between C data types and
|
||||||
the @code{SCM} type with utility functions and macros.
|
the @code{SCM} type with utility functions and macros.
|
||||||
|
@end deftp
|
||||||
|
@cindex SCM data type
|
||||||
|
|
||||||
@item
|
@deftp {Data type} scm_t_bits
|
||||||
@code{scm_t_bits} is an integral data type that is guaranteed to be
|
@code{scm_t_bits} is an integral data type that is guaranteed to be
|
||||||
large enough to hold all information that is required to represent any
|
large enough to hold all information that is required to represent any
|
||||||
Scheme object. While this data type is mostly used to implement Guile's
|
Scheme object. While this data type is mostly used to implement Guile's
|
||||||
internals, the use of this type is also necessary to write certain kinds
|
internals, the use of this type is also necessary to write certain kinds
|
||||||
of extensions to Guile.
|
of extensions to Guile.
|
||||||
@end itemize
|
@end deftp
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Relationship between SCM and scm_t_bits::
|
* Relationship between SCM and scm_t_bits::
|
||||||
|
|
|
@ -97,13 +97,10 @@ interpreter, you will have to add more libraries.
|
||||||
|
|
||||||
The following C constants and data types are defined in gh:
|
The following C constants and data types are defined in gh:
|
||||||
|
|
||||||
@deftp {Data type} SCM
|
@code{SCM} is a C data type used to store all Scheme data, no matter what the
|
||||||
This is a C data type used to store all Scheme data, no matter what the
|
|
||||||
Scheme type. Values are converted between C data types and the SCM type
|
Scheme type. Values are converted between C data types and the SCM type
|
||||||
with utility functions described below (@pxref{Converting data between C
|
with utility functions described below (@pxref{Converting data between C
|
||||||
and Scheme}). [FIXME: put in references to Jim's essay and so forth.]
|
and Scheme}). [FIXME: put in references to Jim's essay and so forth.]
|
||||||
@end deftp
|
|
||||||
@cindex SCM data type
|
|
||||||
|
|
||||||
@defvr Constant SCM_BOOL_T
|
@defvr Constant SCM_BOOL_T
|
||||||
@defvrx Constant SCM_BOOL_F
|
@defvrx Constant SCM_BOOL_F
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue