<FromGitter>
<anhedonia:sakura.ci> I have a question about C bindings, is there an easy way to pass an `IO` instance (`STDOUT` for example, preferably instance of `IO::Memory`) to a C function that takes `FILE*` as an argument? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=6282a03a61f5ca3fee04dd98]
<FromGitter>
<remiliascarlet:nanako.mooo.com> If I'm not mistaken, if the IO is actually a File, then you can use `that_io.fd` to get the raw file descriptor. ⏎ https://crystal-lang.org/api/1.4.1/IO/FileDescriptor.html#fd%3AInt-instance-method
<FromGitter>
<remiliascarlet:nanako.mooo.com> Not sure about other subclasses of IO, though.
<FromGitter>
<remiliascarlet:nanako.mooo.com> It could be that I'm missing something in the standard library that already does this for you, but a few quick searches isn't pulling up much ^_^; So unless it exists, you could wrap `fdopen`, then use your wrapped function long with `#fd` to get a `FILE*` pointer.