This library provides C typedef and C struct interface.
|
define-c-enum | Defines a C enumeration constant |
define-c-typedef | Defines a C structure type |
define-c-struct-methods | Defines a constructor, accessors, and mutators for a C structure type |
define-c-struct-type | Is a handy macro that combines define-c-typedef and define-c-struct-methods |
c-sizeof | Returns a byte size of C primitive or C structure type |
c-coerce-void* | Coerces a C void* value to a C structure object |
bytevector-c-short-ref | Retrieves a short value from a bytevector |
bytevector-c-int-ref | Retrieves an int value from a bytevector |
bytevector-c-long-ref | Retrieves a long value from a bytevector |
bytevector-c-long-long-ref | Retrieves a long long value from a bytevector |
bytevector-c-void*-ref | Retrieves a void* value from a bytevector |
bytevector-c-float-ref | Retrieves a float value from a bytevector |
bytevector-c-double-ref | Retrieves a double value from a bytevector |
bytevector-c-unsigned-short-ref | Retrieves an unsigned short value from a bytevector |
bytevector-c-unsigned-int-ref | Retrieves an unsigned int value from a bytevector |
bytevector-c-unsigned-long-ref | Retrieves an unsigned long value from a bytevector |
bytevector-c-unsigned-long-long-ref | Retrieves an unsigned long long value from a bytevector |
bytevector-c-int8-ref | Retrieves an int8_t value from a bytevector |
bytevector-c-int16-ref | Retrieves an int16_t value from a bytevector |
bytevector-c-int32-ref | Retrieves an int32_t value from a bytevector |
bytevector-c-int64-ref | Retrieves an int64_t value from a bytevector |
bytevector-c-uint8-ref | Retrieves an uint8_t value from a bytevector |
bytevector-c-uint16-ref | Retrieves an uint16_t value from a bytevector |
bytevector-c-uint32-ref | Retrieves an uint32_t value from a bytevector |
bytevector-c-uint64-ref | Retrieves an uint64_t value from a bytevector |
bytevector-c-short-set! | Stores a short value to a bytevector |
bytevector-c-int-set! | Stores an int value to a bytevector |
bytevector-c-long-set! | Stores a long value to a bytevector |
bytevector-c-long-long-set! | Stores a long long value to a bytevector |
bytevector-c-void*-set! | Stores a void* value to a bytevector |
bytevector-c-float-set! | Stores a float value to a bytevector |
bytevector-c-double-set! | Stores a double value to a bytevector |
bytevector-c-int8-set! | Stores an int8_t value to a bytevector |
bytevector-c-int16-set! | Stores an int16_t value to a bytevector |
bytevector-c-int32-set! | Stores an int32_t value to a bytevector |
bytevector-c-int64-set! | Stores an int64_t value to a bytevector |
bytevector-c-strlen | Returns a C string length of its contents |
make-c-bool | Returns a bytevector contains a bool value |
make-c-short | Returns a bytevector contains a short value |
make-c-int | Returns a bytevector contains an int value |
make-c-long | Returns a bytevector contains a long value |
make-c-long-long | Returns a bytevector contains a long long value |
make-c-void* | Returns a bytevector contains a void* value |
make-c-float | Returns a bytevector contains a float value |
make-c-double | Returns a bytevector contains a double value |
make-c-int8 | Returns a bytevector contains an int8_t value |
make-c-int16 | Returns a bytevector contains an int16_t value |
make-c-int32 | Returns a bytevector contains an int32_t value |
make-c-int64 | Returns a bytevector contains an int64_t value |
c-bool-ref | Retrieves a bool value from a memory |
c-short-ref | Retrieves a short value from a memory |
c-int-ref | Retrieves an int value from a memory |
c-long-ref | Retrieves a long value from a memory |
c-long-long-ref | Retrieves a long long value from a memory |
c-void*-ref | Retrieves a void* value from a memory |
c-float-ref | Retrieves a float value from a memory |
c-double-ref | Retrieves a double value from a memory |
c-unsigned-short-ref | Retrieves an unsigned short value from a memory |
c-unsigned-int-ref | Retrieves an unsigned int value from a memory |
c-unsigned-long-ref | Retrieves an unsigned long value from a memory |
c-unsigned-long-long-ref | Retrieves an unsigned long long value from a memory |
c-int8-ref | Retrieves an int8_t value from a memory |
c-int16-ref | Retrieves an int16_t value from a memory |
c-int32-ref | Retrieves an int32_t value from a memory |
c-int64-ref | Retrieves an int64_t value from a memory |
c-uint8-ref | Retrieves an uint8_t value from a memory |
c-uint16-ref | Retrieves an uint16_t value from a memory |
c-uint32-ref | Retrieves an uint32_t value from a memory |
c-uint64-ref | Retrieves an uint64_t value from a memory |
c-string-ref | Retrieves a C string from a memory |
c-bool-set! | Stores a bool value to a memory |
c-short-set! | Stores a short value to a memory |
c-int-set! | Stores a int value to a memory |
c-long-set! | Stores a long value to a memory |
c-long-long-set! | C-long-set! stores a long long value to a memory |
c-void*-set! | Stores a void* value to a memory |
c-float-set! | Stores a float value to a memory |
c-double-set! | Stores a double value to a memory |
c-int8-set! | Stores a int8_t value to a memory |
c-int16-set! | Stores a int16_t value to a memory |
c-int32-set! | Stores a int32_t value to a memory |
c-int64-set! | Stores a int64_t value to a memory |
c-string-set! | Stores a C string to a memory |
alignof:bool | <constant> |
alignof:short | <constant> |
alignof:int | <constant> |
alignof:long | <constant> |
alignof:long-long | <constant> |
alignof:size_t | <constant> |
alignof:void* | <constant> |
alignof:float | <constant> |
alignof:double | <constant> |
alignof:int8_t | <constant> |
alignof:int16_t | <constant> |
alignof:int32_t | <constant> |
alignof:int64_t | <constant> |
sizeof:bool | <constant> |
sizeof:short | <constant> |
sizeof:int | <constant> |
sizeof:long | <constant> |
sizeof:size_t | <constant> |
sizeof:void* | <constant> |
define-c-enum defines a C enumeration constant. This macro has an analogy to the C enum statement.
|
(define-c-enum spec ...)
|
spec:
|
<subform>
|
> (import (rnrs) (ypsilon c-types))
> (define-c-enum FOO (BAR . 10) BAZ)
> (list FOO BAR BAZ)
(0 10 11)
|
define-c-typedef defines a C structure type. This macro has an analogy to the C typedef statement.
|
|
|
define-c-typedef does not define a constructor, accessors, nor mutators, use define-c-struct-methods to define them.
|
> (import (rnrs) (ypsilon c-types))
> (define-c-typedef time_t long)
> (define-c-typedef suseconds_t long)
> (define-c-typedef timeval (struct (time_t tv_sec) (suseconds_t tv_usec)))
> timeval
#<c-typedef timeval 8 4 (struct (time_t tv_sec) (suseconds_t tv_usec))>
|
define-c-struct-methods defines a constructor, accessors, and mutators for a C structure type.
|
(define-c-struct-methods type-name ...)
|
type-name:
|
<symbol>
|
The constructor returns a bytevector for a strage to hold field values. The mutator stores a two's complement representation of a value to a field, and it is an assertion violation if the value does not fit to the field. Methods defined by define-c-struct-methods are macro, and following naming convention is used to name them:
|
|
> (import (rnrs) (ypsilon c-types))
> (define-c-typedef point (struct (int x) (int y)))
> point
#<c-typedef point 8 4 (struct (int x) (int y))>
> (define-c-struct-methods point)
> (define pt (make-point)) ; make-point
> pt
#vu8(0 0 0 0 0 0 0 0)
> (point-x-set! pt 1000) ; point-x-set!
> (point-y-set! pt -500) ; point-y-set!
> pt
#vu8(232 3 0 0 12 254 255 255)
> (point-x pt) ; point-x
1000
> (point-y pt) ; point-y
-500
|
;; demonstrate assignments to 32bit fields
> (import (rnrs) (ypsilon c-types))
> (define-c-typedef type32b (struct (uint32_t u) (int32_t s)))
> (define-c-struct-methods type32b)
> (define nums (make-type32b))
> (type32b-u-set! nums #xffffffff)
> (type32b-u nums)
4294967295
;; int32_t s = (signed)4294967295U;
;; cout << s; /* prints -1 */
> (type32b-s-set! nums 4294967295)
> (type32b-s nums)
-1
;; uint32_t u = (unsigned)-1;
;; cout << u; /* prints 4294967295 */
> (type32b-u-set! nums -1)
> (type32b-u nums)
4294967295
|
(define-c-struct-type type-name (field-type field-name) ...)
|
type-name:
field-type:
field-name:
|
<symbol>
<symbol>
<symbol>
|
> (import (rnrs) (ypsilon c-types))
> (define-c-struct-type point (int x) (int y))
> (define pt (make-point))
> (point-x-set! pt 1000)
> (point-y-set! pt -500)
> pt
#vu8(232 3 0 0 12 254 255 255)
> (point-x pt)
1000
> (point-y pt)
-500
|
c-sizeof returns a byte size of C primitive or C structure type.
|
(c-sizeof type-name)
|
type-name:
|
<symbol>
|
> (import (ypsilon c-types))
;; primitive type
> (c-sizeof unsigned-int)
4
;; structure type
> (define-c-typedef foo (struct (int8_t u8) (int32_t u32)))
> (c-sizeof foo)
8
|
c-coerce-void* coerces a C void* value to a C structure object.
|
(c-coerce-void* expression type-name)
|
expression:
type-name:
|
<subform>
<symbol>
|
The expression must be evaluated as an exact integer.
|
Be aware that misuse of this procedure causes a fatal error, segmentation fault for an example.
|
> (import (ypsilon sdl))
> (SDL_Init SDL_INIT_EVERYTHING)
0 ; init success
> (define screen (SDL_SetVideoMode 256 256 32 SDL_SWSURFACE))
> screen
159419344 ; 0x9808bd0
> (define surface (c-coerce-void* screen SDL_Surface))
> surface
#<bytevector-mapping 0x9808bd0 60>
> (SDL_MapRGB (SDL_Surface-format surface) #x20 #xff #x10)
2162448 ; 0x20ff10
|
bytevector-c-short-ref retrieves a short value from a bytevector.
|
(bytevector-c-short-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-int-ref retrieves an int value from a bytevector.
|
(bytevector-c-int-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-long-ref retrieves a long value from a bytevector.
|
(bytevector-c-long-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-long-long-ref retrieves a long long value from a bytevector.
|
(bytevector-c-long-long-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-void*-ref retrieves a void* value from a bytevector.
|
(bytevector-c-void*-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-float-ref retrieves a float value from a bytevector.
|
(bytevector-c-float-ref bytevector byteoffset)
=> <flonum>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-double-ref retrieves a double value from a bytevector.
|
(bytevector-c-double-ref bytevector byteoffset)
=> <flonum>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-unsigned-short-ref retrieves an unsigned short value from a bytevector.
|
(bytevector-c-unsigned-short-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-unsigned-int-ref retrieves an unsigned int value from a bytevector.
|
(bytevector-c-unsigned-int-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-unsigned-long-ref retrieves an unsigned long value from a bytevector.
|
(bytevector-c-unsigned-long-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-unsigned-long-long-ref retrieves an unsigned long long value from a bytevector.
|
(bytevector-c-unsigned-long-long-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-int8-ref retrieves an int8_t value from a bytevector.
|
(bytevector-c-int8-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-int16-ref retrieves an int16_t value from a bytevector.
|
(bytevector-c-int16-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-int32-ref retrieves an int32_t value from a bytevector.
|
(bytevector-c-int32-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-int64-ref retrieves an int64_t value from a bytevector.
|
(bytevector-c-int64-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-uint8-ref retrieves an uint8_t value from a bytevector.
|
(bytevector-c-uint8-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-uint16-ref retrieves an uint16_t value from a bytevector.
|
(bytevector-c-uint16-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-uint32-ref retrieves an uint32_t value from a bytevector.
|
(bytevector-c-uint32-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-uint64-ref retrieves an uint64_t value from a bytevector.
|
(bytevector-c-uint64-ref bytevector byteoffset)
=> <int>
|
bytevector:
byteoffset:
|
<bytevector>
<int>
|
The byteoffset must be non-negative.
|
bytevector-c-short-set! stores a short value to a bytevector.
|
(bytevector-c-short-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<int>
|
The byteoffset must be non-negative.
The value must be within the range [SHORT_MIN, USHORT_MAX].
|
bytevector-c-int-set! stores an int value to a bytevector.
|
(bytevector-c-int-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<int>
|
The byteoffset must be non-negative.
The value must be within the range [INT_MIN, UINT_MAX].
|
bytevector-c-long-set! stores a long value to a bytevector.
|
(bytevector-c-long-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<int>
|
The byteoffset must be non-negative.
The value must be within the range [LONG_MIN, ULONG_MAX].
|
bytevector-c-long-long-set! stores a long long value to a bytevector.
|
(bytevector-c-long-long-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<int>
|
The byteoffset must be non-negative.
The value must be within the range [LONGLONG_MIN, ULONGLONG_MAX].
|
bytevector-c-void*-set! stores a void* value to a bytevector.
|
(bytevector-c-void*-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<int>
|
The byteoffset must be non-negative.
The value must be within the range [INTPTR_MIN, UINTPTR_MAX].
|
bytevector-c-float-set! stores a float value to a bytevector.
|
(bytevector-c-float-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<flonum>
|
The byteoffset must be non-negative.
|
bytevector-c-double-set! stores a double value to a bytevector.
|
(bytevector-c-double-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<flonum>
|
The byteoffset must be non-negative.
|
bytevector-c-int8-set! stores an int8_t value to a bytevector.
|
(bytevector-c-int8-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<int>
|
The byteoffset must be non-negative.
The value must be within the range [INT8_MIN, UINT8_MAX].
|
bytevector-c-int16-set! stores an int16_t value to a bytevector.
|
(bytevector-c-int16-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<int>
|
The byteoffset must be non-negative.
The value must be within the range [INT16_MIN, UINT16_MAX].
|
bytevector-c-int32-set! stores an int32_t value to a bytevector.
|
(bytevector-c-int32-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<int>
|
The byteoffset must be non-negative.
The value must be within the range [INT32_MIN, UINT32_MAX].
|
bytevector-c-int64-set! stores an int64_t value to a bytevector.
|
(bytevector-c-int64-set! bytevector byteoffset value)
=> unspecified
|
bytevector:
byteoffset:
value:
|
<bytevector>
<int>
<int>
|
The byteoffset must be non-negative.
The value must be within the range [INT64_MIN, UINT64_MAX].
|
bytevector-c-strlen returns a C string length of its contents.
|
(bytevector-c-strlen bytevector)
=> <int>
|
bytevector:
|
<bytevector>
|
If no terminating zero byte exists in the bytevector, bytevector-c-strlen returns bytevector-length of the bytevector.
|
make-c-bool returns a bytevector contains a bool value.
|
(make-c-bool value)
=> <bytevector>
|
value:
|
<int>
|
make-c-short returns a bytevector contains a short value.
|
(make-c-short value)
=> <bytevector>
|
value:
|
<int>
|
The value must be within the range [SHORT_MIN, USHORT_MAX].
|
make-c-int returns a bytevector contains an int value.
|
(make-c-int value)
=> <bytevector>
|
value:
|
<int>
|
The value must be within the range [INT_MIN, UINT_MAX].
|
make-c-long returns a bytevector contains a long value.
|
(make-c-long value)
=> <bytevector>
|
value:
|
<int>
|
The value must be within the range [LONG_MIN, ULONG_MAX].
|
make-c-long-long returns a bytevector contains a long long value.
|
(make-c-long-long value)
=> <bytevector>
|
value:
|
<int>
|
The value must be within the range [LONGLONG_MIN, ULONGLONG_MAX].
|
make-c-void* returns a bytevector contains a void* value.
|
(make-c-void* value)
=> <bytevector>
|
value:
|
<int>
|
The value must be within the range [INTPTR_MIN, UINTPTR_MAX].
|
make-c-float returns a bytevector contains a float value.
|
(make-c-float value)
=> <bytevector>
|
value:
|
<flonum>
|
make-c-double returns a bytevector contains a double value.
|
(make-c-double value)
=> <bytevector>
|
value:
|
<flonum>
|
make-c-int8 returns a bytevector contains an int8_t value.
|
(make-c-int8 value)
=> <bytevector>
|
value:
|
<int>
|
The value must be within the range [INT8_MIN, UINT8_MAX].
|
make-c-int16 returns a bytevector contains an int16_t value.
|
(make-c-int16 value)
=> <bytevector>
|
value:
|
<int>
|
The value must be within the range [INT16_MIN, UINT16_MAX].
|
make-c-int32 returns a bytevector contains an int32_t value.
|
(make-c-int32 value)
=> <bytevector>
|
value:
|
<int>
|
The value must be within the range [INT32_MIN, UINT32_MAX].
|
make-c-int64 returns a bytevector contains an int64_t value.
|
(make-c-int64 value)
=> <bytevector>
|
value:
|
<int>
|
The value must be within the range [INT64_MIN, UINT64_MAX].
|
make-c-string returns a bytevector contains a C string.
|
(make-c-string value)
=> <bytevector>
|
value:
|
<string>
|
A terminating zero byte will be appended.
|
c-bool-ref retrieves a bool value from a memory.
|
(c-bool-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-short-ref retrieves a short value from a memory.
|
(c-short-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-int-ref retrieves an int value from a memory.
|
(c-int-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-long-ref retrieves a long value from a memory.
|
(c-long-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-long-long-ref retrieves a long long value from a memory.
|
(c-long-long-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-void*-ref retrieves a void* value from a memory.
|
(c-void*-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-float-ref retrieves a float value from a memory.
|
(c-float-ref location)
=> <flonum>
|
location:
|
<address> or <bytevector>
|
c-double-ref retrieves a double value from a memory.
|
(c-double-ref location)
=> <flonum>
|
location:
|
<address> or <bytevector>
|
c-unsigned-short-ref retrieves an unsigned short value from a memory.
|
(c-unsigned-short-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-unsigned-int-ref retrieves an unsigned int value from a memory.
|
(c-unsigned-int-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-unsigned-long-ref retrieves an unsigned long value from a memory.
|
(c-unsigned-long-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-unsigned-long-long-ref retrieves an unsigned long long value from a memory.
|
(c-unsigned-long-long-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-int8-ref retrieves an int8_t value from a memory.
|
(c-int8-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-int16-ref retrieves an int16_t value from a memory.
|
(c-int16-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-int32-ref retrieves an int32_t value from a memory.
|
(c-int32-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-int64-ref retrieves an int64_t value from a memory.
|
(c-int64-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-uint8-ref retrieves an uint8_t value from a memory.
|
(c-uint8-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-uint16-ref retrieves an uint16_t value from a memory.
|
(c-uint16-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-uint32-ref retrieves an uint32_t value from a memory.
|
(c-uint32-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-uint64-ref retrieves an uint64_t value from a memory.
|
(c-uint64-ref location)
=> <int>
|
location:
|
<address> or <bytevector>
|
c-string-ref retrieves a C string from a memory.
|
(c-string-ref location)
=> <string>
|
location:
|
<address> or <bytevector>
|
A terminating zero byte will be removed.
|
c-bool-set! stores a bool value to a memory.
|
(c-bool-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<int>
|
c-short-set! stores a short value to a memory.
|
(c-short-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<int>
|
The value must be within the range [SHORT_MIN, USHORT_MAX].
|
c-int-set! stores a int value to a memory.
|
(c-int-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<int>
|
The value must be within the range [INT_MIN, UINT_MAX].
|
c-long-set! stores a long value to a memory.
|
(c-long-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<int>
|
The value must be within the range [LONG_MIN, ULONG_MAX].
|
c-long-set! stores a long long value to a memory.
|
(c-long-long-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<int>
|
The value must be within the range [LONGLONG_MIN, ULONGLONG_MAX].
|
c-void*-set! stores a void* value to a memory.
|
(c-void*-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<int>
|
The value must be within the range [INTPTR_MIN, UINTPTR_MAX].
|
c-float-set! stores a float value to a memory.
|
(c-float-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<flonum>
|
c-double-set! stores a double value to a memory.
|
(c-double-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<flonum>
|
c-int8-set! stores a int8_t value to a memory.
|
(c-int8-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<int>
|
The value must be within the range [INT8_MIN, UINT8_MAX].
|
c-int16-set! stores a int16_t value to a memory.
|
(c-int16-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<int>
|
The value must be within the range [INT16_MIN, UINT16_MAX].
|
c-int32-set! stores a int32_t value to a memory.
|
(c-int32-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<int>
|
The value must be within the range [INT32_MIN, UINT32_MAX].
|
c-int64-set! stores a int64_t value to a memory.
|
(c-int64-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<int>
|
The value must be within the range [INT64_MIN, UINT64_MAX].
|
c-string-set! stores a C string to a memory.
|
(c-string-set! location value)
=> unspecified
|
location:
value:
|
<address> or <bytevector>
<string>
|
A terminating zero byte will be appended.
|
Constants: | alignof:bool, alignof:short, alignof:int, alignof:long, alignof:long-long, alignof:size_t, alignof:void*, alignof:float, alignof:double, alignof:int8_t, alignof:int16_t, alignof:int32_t, alignof:int64_t |
Each constant is defined to an alignment size of correspondent C types.
|
Constants: | sizeof:bool, sizeof:short, sizeof:int, sizeof:long, sizof:long-long, sizeof:size_t, sizeof:void* |
Each constant is defined to a byte size of correspondent C types.
|