docs: Add GTYPE_TO_POINTER/GPOINTER_TO_TYPE

Commit d0e03f09 introduced GTYPE_TO_POINTER/GPOINTER_TO_TYPE, on which
work started before the move of conversion macros to Markdown. It did
get merged after that move, but the macros never made it into the docs.

Let's do so now.
This commit is contained in:
Matthijs Velsink 2024-05-22 22:33:15 +02:00
parent 9b153495b6
commit f2df7c3115

View File

@ -65,6 +65,17 @@ of a 32-bit integer will be mangled.
: Stuffs a `size_t` into a pointer type, and vice versa.
`GTYPE_TO_POINTER(value)`, `GPOINTER_TO_TYPE(value)`
: Stuffs a [`GType`](../gobject/alias.Type.html) into a pointer type, and
vice versa.
These macros should be used instead of `GSIZE_TO_POINTER()`,
`GPOINTER_TO_SIZE()` to ensure portability, since `GType` is not
guaranteed to be the same as `size_t`.
Since: 2.80
## Byte Order Conversion
These macros provide a portable way to determine the host byte order and to