diff --git a/docs/hacking.html.in b/docs/hacking.html.in index f3ad43eee7..0f4587522d 100644 --- a/docs/hacking.html.in +++ b/docs/hacking.html.in @@ -1051,6 +1051,27 @@ BAD:
virStrerror
The GLib g_strerror() function should be used instead, which has a simpler calling convention as an added benefit.
+ + + + + + + + + + + + + + + + + + + + +
deprecated versionGLib versionNotes
VIR_ALLOC(var)g_new0(var_t, 1)the type needs to be passed explicitly
VIR_ALLOC_Ng_new0(var_t, n)
VIR_REALLOC_Ng_renew(var_t, ptr, n)the newly added memory is not zeroed
VIR_EXPAND_Ng_renew(var_t, ptr, n)zero the new memory manually or use an array type
VIR_SHRINK_Ng_renew(var_t, ptr, n)
VIR_APPEND_ELEMENTg_array_append_valg_ptr_array_add or g_byte_array_append
VIR_INSERT_ELEMENTg_array_insert_valg_ptr_array_insert
VIR_DELETE_ELEMENTg_array_remove_indexg_ptr_array_remove_index or g_byte_array_remove_index
VIR_FREEg_freeg_free does not zero the pointer