From nobody Sun Feb 8 09:22:39 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573578116; cv=none; d=zoho.com; s=zohoarc; b=orNM5FpM0xwRrR/+VRV1LgNdJaJvub+y6etRNEXVRHICXc5aezoEAymMm7dpu/TcdCxWn1BT/XCt9UfW9DceDUCZEC2CFnv8wur3dZCH9PDv+HCYJ2ACLwBOEegoVNHZ3XOXHz3RMByI/dAGH5YSDcqN14/wIJwhKI9T2xdzsDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573578116; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1tADRzuZlMMRFX7lI8TODWjc9XtI1YbVQBLj/4mLf3w=; b=O4Vj8B+KOT/v8AYXf+3xW4hHo88/VZcEY0/ycQ1an+NuPMYgJBdcikhac5NLlllcYmD2CQmHdddMijDf7oOK5giZoyAnq3Mar4dBhEu9IvRtVE1BpR2RJyJwgJ7HGQdqJ2qx4EE7H4ReTP96KEz2hiG6MXjTEAlpr9qnhPNXfN8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1573578116301935.8056346394072; Tue, 12 Nov 2019 09:01:56 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-262-qFeB4FgGPmiajgLC-s8DPA-1; Tue, 12 Nov 2019 12:01:51 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3073C8C4A6F; Tue, 12 Nov 2019 17:01:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB9BFBEA73; Tue, 12 Nov 2019 17:01:44 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 82F7A18034FB; Tue, 12 Nov 2019 17:01:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xACH1Yor012339 for ; Tue, 12 Nov 2019 12:01:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 65314600D5; Tue, 12 Nov 2019 17:01:34 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.43.2.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id E16276016E for ; Tue, 12 Nov 2019 17:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573578115; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=1tADRzuZlMMRFX7lI8TODWjc9XtI1YbVQBLj/4mLf3w=; b=NKGe/Qi09s77MCwP8DeOIGZ8CyjXLwM3jvQU9G8QJ/rPqG3RzuqUZHXcoNxvhvV0FiuexM pn15vHhc6/9P+jwnUC/JvVaisONiuOpTZm63euSh/EvgVi6gY7y4d8qQpP+3VqChhhxXc3 NPULbG/rPDVW/CUzDmRLuaXHGJOX9Dw= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 12 Nov 2019 18:02:17 +0100 Message-Id: <8659d0b4943a7b1c8f92c6ec5c1ccce76b02de30.1573578043.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 9/9] docs: hacking: document removal of VIR_STR(N)DUP X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: qFeB4FgGPmiajgLC-s8DPA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: J=C3=A1n Tomko Reviewed-by: Daniel Henrique Barboza --- docs/hacking.html.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/hacking.html.in b/docs/hacking.html.in index 06deab9e90..74aba5d46b 100644 --- a/docs/hacking.html.in +++ b/docs/hacking.html.in @@ -1040,9 +1040,6 @@ BAD: a single method. Keep the style consistent, converting existing code to GLib style in a separate, prior commit. =20 -
VIR_STRDUP, VIR_STRNDUP
-
Prefer the GLib APIs g_strdup and g_strndup.
-
virStrerror
The GLib g_strerror() function should be used inste= ad, which has a simpler calling convention as an added benefit.
@@ -1071,8 +1068,6 @@ BAD:

String allocation macros and functions:

= - = - @@ -1108,6 +1103,9 @@ BAD:
The GLib macros g_autoptr and G_DEFINE_AUTOPT= R_CLEANUP_FUNC should be used to manage autoclean of virObject classes. This matches usage with GObject classes.
+ +
VIR_STRDUP, VIR_STRNDUP
+
Prefer the GLib APIs g_strdup and g_strndup.
deprecated versionGLib versionNotes
VIR_STRDUPg_strdup
VIR_STRNDUPg_strndup
virAsprintfg_strdup_printf
virVasprintfg_strdup_vprint use g_vasprintf if you really need to know th= e returned length
@@ -1128,6 +1126,8 @@ BAD: + = +
deleted versionGLib versionNotes
ATTRIBUTE_RETURN_CHECKG_GNUC_W= ARN_UNUSED_RESULT
ATTRIBUTE_SENTINELG_GNUC_NULL_= TERMINATED
ATTRIBUTE_UNUSEDG_GNUC_UNUSED<= /code>
VIR_STRDUPg_strdup
VIR_STRNDUPg_strndup
=20 =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list