Re: Structs in CRUNCH

Diogo via Chicken-users <[email protected]>
Newsgroups gmane.lisp.scheme.chicken
Message-ID <[email protected]>
Hi Anton,

thanks for the confirmation and tips regarding the struct size. I will use
the define-type. That's good enough.

> P3. As I understand identifier naming in Crunch is similar to C:
> underscores,leadchars+[digits]

My problem here is rather that the struct argument of the setters
(eg, rbuf-head!) isn't a pointer.

This
     (define-compound-accessors (struct rbuf)
         ..
         (head rbuf-head rbuf-head!))

generates this:
    void rbuf_X2dhead_X21(struct rbuf _s, uint8_t _x) { _s.head = _x; }

But I'd like to have this:
    void rbuf_X2dhead_X21(struct rbuf *_s, uint8_t _x) { _s->head = _x; }


Cheers,
-Diogo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.