mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gerror: Document in the GError rules that stack allocation is bad
It means that extended error domains can’t be used. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
5f11206237
commit
b2230cb3d1
@ -340,6 +340,8 @@
|
||||
* - A `GError*` must be initialized to %NULL before passing its address
|
||||
* to a function that can report errors.
|
||||
*
|
||||
* - #GError structs must not be stack-allocated.
|
||||
*
|
||||
* - "Piling up" errors is always a bug. That is, if you assign a
|
||||
* new #GError to a `GError*` that is non-%NULL, thus overwriting
|
||||
* the previous error, it indicates that you should have aborted
|
||||
|
Loading…
Reference in New Issue
Block a user