there's a mismatch between implemented code and impnotes.
Impnotes uses (c-array c-type dim1 dim2 ... dimn)
The code implements (c-array c-type (dim1 dim2 ... dimn))
and (c-array c-type dim) as a shortcut for a one-dimensional array.
Back in 1996, before impnotes was converted to HTML, doc/foreign.txt =
already contained this mismatch: the BNF describing c-array, c-struct =
(c-array c-type (dim1 ... dimn)) and (c-array c-type dim1) -- as =
implemented -- while the explaining text talked about (c-array c-type =
dim1 ... dimn). The BNF was dropped during conversion to HTML.
(c-array c-type (dim1 ... dimn))
looks familiar to Lisp declarations (array elt-type (dim1 ... dimn))
However, (c-array c-type Number) means something completely different =
(array elt-type Number): the latter specifies an N-dimensional array.
The number-or-list polymorphism thus resembles MAKE-ARRAY, not Lisp =
If nobody says otherwise during a two weeks delay, I suggest to change =
the documentation to reflect the code, even though I'd prefer the =
(c-array c-type dim1 ... dimn) syntax that the description of c-array =
and ffi:element refer to and which naturally expands the (c-array =
c-type dim1) case. YMMV
Get latest updates about Open Source Projects, Conferences and News.