What is the equivalent of "void" in CFFI?

oleg harput olegharput at gmail.com
Wed Jul 29 10:27:20 UTC 2020


Thanks a lot!

вт, 28 июл. 2020 г. в 16:25, Luís Oliveira <luismbo at gmail.com>:

> On Tue, 28 Jul 2020 at 12:53, oleg harput <olegharput at gmail.com> wrote:
> >
> > void InitWindow(int width, int height, const char *title);
> in C
> >
> > (cffi:defcfun ("InitWindow" init-window)
>       in CFFI
> >     :void                       <==== This void is true or not?
> >   (width (:pointer :int))
> >   (heigh (:pointer :int))
> >   (title (:pointer :char)))
> >
> > please help.
>
> Yes, :void is correct there. (:pointer :int) should be :int instead
> and :string should be more convenient than (:pointer :char) since
> it'll convert Lisp strings to C strings for you. You may find
> https://common-lisp.net/project/cffi/manual/html_node/Tutorial.html
> useful.
>
> Cheers,
>
> --
> Luís Oliveira
> http://kerno.org/~luis/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20200729/6ea37d2e/attachment.htm>


More information about the cffi-devel mailing list