From: Ján Tomko Date: Fri, 18 Oct 2019 21:12:19 +0000 (+0200) Subject: docs: hacking: mention GLib alternatives of libvirt string allocation macros X-Git-Tag: v5.9.0-rc1~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95f3a1fe3cd09dbe33c3cdec5b1055033bc3a82a;p=thirdparty%2Flibvirt.git docs: hacking: mention GLib alternatives of libvirt string allocation macros Document the preferred alternatives to existing libvirt macros for allocating strings. These cannot be deleted just yet because converting them will require a lot of work. Signed-off-by: Ján Tomko Reviewed-by: Daniel P. Berrangé Reviewed-by: Andrea Bolognani --- diff --git a/docs/hacking.html.in b/docs/hacking.html.in index 0f4587522d..d60ea5d120 100644 --- a/docs/hacking.html.in +++ b/docs/hacking.html.in @@ -1072,6 +1072,18 @@ BAD: VIR_FREEg_free g_free does not zero the pointer + +

String allocation macros and functions:

+ + + + + + + + + +
deprecated versionGLib versionNotes
VIR_STRDUPg_strdup
VIR_STRNDUPg_strndup
virAsprintfg_strdup_printf
virVasprintfg_strdup_vprintuse g_vasprintf if you really need to know the returned length
virStrerrorg_strerrorthe error strings are cached globally so no need to free it