summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-07-29 13:54:15 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-07-29 13:54:15 +0000
commit9d3ebce49327fa2c2bc3cf2318d3619c672e2ac0 (patch)
tree5779408dca7f53dd6ed40141650ec1648adcfd3c
parent7ff8176bdb22bfa1960d8ab2da6fa46b7071fd4b (diff)
Added docs.
-rw-r--r--libguile/conv-integer.i.c25
-rw-r--r--libguile/conv-uinteger.i.c25
2 files changed, 50 insertions, 0 deletions
diff --git a/libguile/conv-integer.i.c b/libguile/conv-integer.i.c
index 4a6095fc1..16ec2348b 100644
--- a/libguile/conv-integer.i.c
+++ b/libguile/conv-integer.i.c
@@ -1,3 +1,28 @@
+/* This code in included by number.s.c to generate integer conversion
+ functions like scm_to_int and scm_from_int. It is only for signed
+ types, see conv-uinteger.i.c for the unsigned variant.
+*/
+
+/* You need to define the following macros before including this
+ template. They are undefined at the end of this file to giove a
+ clean slate for the next inclusion.
+
+ TYPE - the integral type to be converted
+ TYPE_MIN - the smallest representable number of TYPE
+ TYPE_MAX - the largest representable number of TYPE
+ SIZEOF_TYPE - the size of TYPE, equal to "sizeof (TYPE)" but
+ in a form that can be computed by the preprocessor.
+ When this number is 0, the preprocessor is not used
+ to select which code to compile; the most general
+ code is always used.
+
+ SCM_TO_TYPE_PROTO(arg), SCM_FROM_TYPE_PROTO(arg)
+ - These two macros should expand into the prototype
+ for the two defined functions, without the return
+ type.
+
+*/
+
TYPE
SCM_TO_TYPE_PROTO (SCM val)
{
diff --git a/libguile/conv-uinteger.i.c b/libguile/conv-uinteger.i.c
index 961000449..7f1e0dc3a 100644
--- a/libguile/conv-uinteger.i.c
+++ b/libguile/conv-uinteger.i.c
@@ -1,3 +1,28 @@
+/* This code in included by number.s.c to generate integer conversion
+ functions like scm_to_int and scm_from_int. It is only for
+ unsigned types, see conv-integer.i.c for the signed variant.
+*/
+
+/* You need to define the following macros before including this
+ template. They are undefined at the end of this file to giove a
+ clean slate for the next inclusion.
+
+ TYPE - the integral type to be converted
+ TYPE_MIN - the smallest representable number of TYPE, typically 0.
+ TYPE_MAX - the largest representable number of TYPE
+ SIZEOF_TYPE - the size of TYPE, equal to "sizeof (TYPE)" but
+ in a form that can be computed by the preprocessor.
+ When this number is 0, the preprocessor is not used
+ to select which code to compile; the most general
+ code is always used.
+
+ SCM_TO_TYPE_PROTO(arg), SCM_FROM_TYPE_PROTO(arg)
+ - These two macros should expand into the prototype
+ for the two defined functions, without the return
+ type.
+
+*/
+
TYPE
SCM_TO_TYPE_PROTO (SCM val)
{