mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-12 15:37:35 +02:00
Adding define-c-const documentation.
This commit is contained in:
parent
e2cae1558c
commit
5e4158a390
1 changed files with 14 additions and 1 deletions
|
@ -885,7 +885,7 @@ keyword.
|
|||
((link addrinfo) ai_next address-info-next))
|
||||
}
|
||||
|
||||
@subsection{Function Interface}
|
||||
@subsection{Function and Constant Interface}
|
||||
|
||||
C functions are defined with:
|
||||
|
||||
|
@ -904,6 +904,19 @@ conversion as discussed below.
|
|||
(define-c int connect (int sockaddr int))
|
||||
}
|
||||
|
||||
Constants can be defined with:
|
||||
|
||||
@scheme{(define-c-const type name-space)}
|
||||
|
||||
where @var{name-space} is the same form as in @scheme{define-c}. This
|
||||
defines a Scheme variable with the same value as the C constant.
|
||||
|
||||
@schemeblock{
|
||||
;; Example: define address family constants in Scheme
|
||||
(define-c-const int (address-family/unix "AF_UNIX"))
|
||||
(define-c-const int (address-family/inet "AF_INET"))
|
||||
}
|
||||
|
||||
@subsection{C Types}
|
||||
|
||||
@subsubsection{Basic Types}
|
||||
|
|
Loading…
Add table
Reference in a new issue