Yes, you can. Please take a look at how 'charptr' is handled in the following simple example:
https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/MISC/mysendmailist.dats On Sat, Jun 5, 2021 at 3:42 PM David Smith <[email protected]> wrote: > > Hey, > I'm trying to use a C library (libwayland) from ATS (still), and now I > finally got everything working, but I'm getting a few warnings related to > function pointers. > > I got the following code > > typedef > wl_registry_listener = $extype_struct "struct wl_registry_listener" of > { > global= (ptr, !wl_registry1, uint32, string, uint32) -<1> void, > global_remove= (ptr, !wl_registry1, uint32) -<1> void > } > > However it complains about incompatible pointer types, as ATS seems to use > `void *` for the ptr, the registry and the string. > > Is there any way I can get rid of this warning or do I just have to live > with it? > > Thanks in advance! > > -- > You received this message because you are subscribed to the Google Groups > "ats-lang-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ats-lang-users/badd3f1d-9c67-4b90-962a-e1207e67c143n%40googlegroups.com > <https://groups.google.com/d/msgid/ats-lang-users/badd3f1d-9c67-4b90-962a-e1207e67c143n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpD6rchn1xjm41_LZSrqPoffr29jt7%2B-CKjk7YwffBMZw%40mail.gmail.com.
