Next Previous Up Top Contents Index

1.9 Utility designator classes

<C-string>

Open abstract class

Description

A mapped subclass of <C-char*> and <string>. On export the Dylan types <C-string>, or <byte-string> may be passed to C. On import all values are mapped to <C-string>. A <byte-string> may be passed to C directly and no copying takes place. The value in C will be a pointer to the data of the byte-string. The implementation of <byte-string> is such that, unless there are NULL characters embedded in the string, strlen in C and size in Dylan will return the same value.

A <byte-string> may only be safely passed to a C function if its value is never stored and used after the call returns.


C FFI and Win 32 Reference - 31 MAR 2000

Next Previous Up Top Contents Index