While those declarations do reflect the C code, assuming that `_char` is an alias for `_byte`, I think it's probably not the intent of the library that you look at the data referenced by a `hb_language_t`. The `struct` declaration looks like a placeholder.
Probably (define _hb_language_t (_cpointer 'hb_language_t)) is what you want to work with, which makes `hb_language_t` a reference to a kind of abstract type. At Wed, 28 Nov 2018 11:23:05 -0800, Matthew Butterick wrote: > To call my C rusty would be an insult to rust. I'm trying to write an FFI > wrapper for certain datatypes in the Harfbuzz library: > > struct hb_language_impl_t { > const char s[1]; > }; > typedef const struct hb_language_impl_t *hb_language_t; > > > Is this the right interpretation? > > (define _one-char-array (make-array-type _char 1)) > (define-cstruct _hb_language_impl_t > ([s _one-char-array])) > (define _hb_language_t _hb_language_impl_t-pointer) > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.