logoalt Hacker News

tracymirandayesterday at 9:34 PM2 repliesview on HN

Some recent fixes went into 6.2.3 which really help with C interop, this post shows what that looks like in practice https://www.swift.org/blog/improving-usability-of-c-librarie...


Replies

randomNumber7today at 11:04 AM

These look mostly like toy examples where the type of the pointer can be inferred from the return values of the functions.

How do I call this function in swift?

SDL_AudioSpec* SDL_LoadWAV_RW(SDL_RWops * src, int freesrc, SDL_AudioSpec * spec, Uint8 * * audio_buf, Uint32 * audio_len);

frizlabyesterday at 9:45 PM

yup, it got much better recently