GBytes: add range-checked pointer getter

Updated and improved by Nitin Wartkar.

Fixes: #1098
This commit is contained in:
Nitin Wartkar
2021-06-15 12:01:11 +00:00
committed by Philip Withnall
parent 9d2d99efe7
commit e3452ea01f
4 changed files with 113 additions and 0 deletions

View File

@@ -85,6 +85,13 @@ GLIB_AVAILABLE_IN_ALL
gint g_bytes_compare (gconstpointer bytes1,
gconstpointer bytes2);
GLIB_AVAILABLE_IN_2_70
gconstpointer g_bytes_get_region (GBytes *bytes,
gsize element_size,
gsize offset,
gsize n_elements);
G_END_DECLS
#endif /* __G_BYTES_H__ */