mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-13 12:56:15 +01:00
b393413321
Inspired by libglnx's glnx_close_fd() and glnx_autofd, these let us have the same patterns as g_clear_object() and g_autoptr(GObject), but for file descriptors. g_clear_fd() is cross-platform, while g_autofd is syntactic sugar requiring a supported compiler (gcc or clang). Now that g_close() checks for EBADF as a programming error, we can implement the equivalent of glnx_autofd as an inline function without needing to have errno and EBADF in the header file. g_clear_fd() is like glnx_close_fd(), but with error checking. The private _g_clear_fd_ignore_error() function used to implement g_autofd is a closer equivalent of glnx_close_fd(). Signed-off-by: Simon McVittie <smcv@collabora.com> |
||
---|---|---|
.. | ||
xml | ||
building.xml | ||
changes.xml | ||
compiling.xml | ||
cross.xml | ||
file-name-encodings.png | ||
file-name-encodings.sxd | ||
glib-docs.xml | ||
glib-gettextize.xml | ||
glib-overrides.txt | ||
glib-sections.txt.in | ||
gtester-report.xml | ||
gtester.xml | ||
gvariant-text.xml | ||
gvariant-varargs.xml | ||
mainloop-states.eps | ||
mainloop-states.fig | ||
mainloop-states.gif | ||
mainloop-states.png | ||
meson.build | ||
programming.xml | ||
regex-syntax.xml | ||
resources.xml | ||
running.xml | ||
Sorted_binary_tree_breadth-first_traversal.svg | ||
Sorted_binary_tree_inorder.svg | ||
Sorted_binary_tree_postorder.svg | ||
Sorted_binary_tree_preorder.svg | ||
version.xml.in |