From nobody Tue Dec 16 04:30:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1742205888; cv=none; d=zohomail.com; s=zohoarc; b=K0SZ0DbyOA1t5B7+tukH+fDzCgoSCr16f8/F7OBJsOtYrprB6gJ79dcWagmRh350VN3JFe6H7QGYlkbmyme1tajHjkNwdKMQZZmvM0Qwr/XGTG5MW0/Cm4RFalRXgLJOGEAv2mAMy1pgXmLdj0HIsnpUQWyYmBm8zSgGn2ltxMo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742205888; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id; bh=LczV3O3ZNW4YL8dZopdkEoqwxsDGhfdEgxeXNIdJS6g=; b=MiH0cVvAtIzXIr+NYbz5tRWZRfYPzfthF08IGC7r0NJRehtODS17Ct884AOrV7Tt3oGA5oKn4dmxV6f315TfKx0x8KifEOOtgUxF9wpwxmOwsvb6iFHV1ABde8qtqkfEng1xcC6xdvrFymNSrwXbJdvgD1cjbiWegX4wsj6N1ZU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 174220588829741.01169926589773; Mon, 17 Mar 2025 03:04:48 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 653992339; Mon, 17 Mar 2025 06:04:47 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A30B5232A; Mon, 17 Mar 2025 06:04:28 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 1C2FB2315; Mon, 17 Mar 2025 06:04:25 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 96F36230F for ; Mon, 17 Mar 2025 06:04:24 -0400 (EDT) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-682-dnQ-cK5aNLS_iQ530V_V2w-1; Mon, 17 Mar 2025 06:04:20 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CC1D819560BD for ; Mon, 17 Mar 2025 10:04:19 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.27]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 982DD1800268; Mon, 17 Mar 2025 10:04:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1742205864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2UKoY7V6QkPGjJxSBWusNEghnYSsNh3PB8uEMbm7f0o=; b=b4AwO4Usew3sfG30jql7nEXuD4zek6Q2BaO5/RCTLtF7FjApSwyS6CIaqHNesMC94xtUg2 5kvAzD26LVsdlw/Lo1q/SwPajefotI4exMSPuo0JLXIFcVPZ1PA1hKdqE5SuV8lbLBBGR9 xQkhxmO4g9H6C3WhAkkcu8vcYMDBBGU= X-MC-Unique: dnQ-cK5aNLS_iQ530V_V2w-1 X-Mimecast-MFC-AGG-ID: dnQ-cK5aNLS_iQ530V_V2w_1742205860 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH] docs: remove references to removed APIs Date: Mon, 17 Mar 2025 10:04:17 +0000 Message-ID: <20250317100417.18647-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: q8TPh29UFGpcnQ78FN4FWVeOK46q8wS81YyRl4cw_nU_1742205860 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 3L4FDYWXQZNQRMWL6IJKG57B6QUN5DK2 X-Message-ID-Hash: 3L4FDYWXQZNQRMWL6IJKG57B6QUN5DK2 X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1742205891061019000 Content-Type: text/plain; charset="utf-8" The glib adoption docs was suggesting avoidance of certain APIs that were obsoleted by glib, during the transition period. Now that the referenced APIs no longer exist in libvirt code, they can also be removed from the docs. NB, the virStringListRemoveDuplicates method remains since there is no glib equivalent. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Pavel Hrdina --- docs/glib-adoption.rst | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/docs/glib-adoption.rst b/docs/glib-adoption.rst index f969ac80a1..046cd821f7 100644 --- a/docs/glib-adoption.rst +++ b/docs/glib-adoption.rst @@ -14,19 +14,6 @@ the GLib APIs straight away where possible. The following is a list of libvirt APIs that should no longer be used in new code, and their suggested GLib replacements: =20 -Memory allocation - ``VIR_ALLOC``, ``VIR_REALLOC``, ``VIR_RESIZE_N``, - ``VIR_EXPAND_N``, ``VIR_SHRINK_N``, ``VIR_FREE`` - - https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html - - Prefer the GLib APIs ``g_new0``/``g_renew``/ ``g_free`` in most - cases. There should rarely be a need to use - ``g_malloc``/``g_realloc``. **NEVER MIX** use of the classic - libvirt memory allocation APIs and GLib APIs within a single - method. Keep the style consistent, converting existing code to - GLib style in a separate, prior commit. - Array operations ``VIR_APPEND_ELEMENT``, ``VIR_INSERT_ELEMENT``, ``VIR_DELETE_ELEMENT`` =20 @@ -37,15 +24,6 @@ Array operations These all use a struct to track the array memory and size together and efficiently resize. =20 -String arrays - ``virStringList*``, ``virStringListCount*`` - - https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.h= tml - - Prefer the NULL-terminated variant instead of storing the count - separately. Prefer ``g_str*v`` functions instead of their ``vir*`` - counterparts. For use with ``g_auto`` GLib provides the ``GStrv`` type. - Objects ``virObject`` =20 --=20 2.48.1