[Github-comments] [geany/geany] `write_data_to_disk()` does not follow Glib advice (#1271)

elextr notifications at xxxxx
Sat Oct 22 00:28:55 UTC 2016


Glib docs note on `g_fopen()`:

"Because file descriptors are specific to the C library on Windows, and a file descriptor is part of the FILE struct, the FILE* returned by this function makes sense only to functions in the same C library. Thus if the GLib-using code uses a different C library than GLib does, the FILE* returned by this function cannot be passed to C library functions like fprintf() or fread()."

But it is passed to `fwrite()` by Geany.

I presume @eht16 ensures no C library problems when bundles are made, but anyone building it themselves may have an issue.

Should the `g_fopen()` be replaced by plain `fopen()`?  

@eht16, Why was the `g_` version used in the first place since there is no matching `g_fwrite()`?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1271
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20161021/8d53b532/attachment.html>


More information about the Github-comments mailing list