From nobody Sun Feb 8 12:32:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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=1600950650; cv=none; d=zohomail.com; s=zohoarc; b=PpFylQ/989tO9daeEJD9+UXyNPo4skvlyXZ1pti99Tdx7GKzxQmWG88EFxzCvOq+TUQD0Iwjwc0ifS/JapEvxFwcROgeBmH0oDlUM79h/tx8PkF4yD9twuy25Ebdw/w0ci8tYqCkHOHB1FMudT6pzABP1WEtzcqiAAgCF4OfdOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600950650; 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=pmOyb2pn3FXg99iwCbjdc3glBUd3TFcLSOBKAfuZ5iI=; b=V7NkFTSBFAL64lhZcDUL7qWsAxOBQ6TcB3KjZUzXzMprXQvtoamOcYjy0KZ+x+i9Ih0nl/5EZXSnheST9pKzAiT3qBFsci0KmE3O78/DyecTexwjLJ3+jTRQWgZii+IYXEO/e8ESlkO5+HK553M1uNp2S3k/vzPXRVxzRAvVfyg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1600950650453355.0742879533759; Thu, 24 Sep 2020 05:30:50 -0700 (PDT) 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-364-Y1uVMjA9N4iJeLB0fg6RAA-1; Thu, 24 Sep 2020 08:30:46 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CB954802B4A; Thu, 24 Sep 2020 12:30:41 +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 9BBD660C15; Thu, 24 Sep 2020 12:30:41 +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 617A4181A06D; Thu, 24 Sep 2020 12:30:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08OCSnM9016101 for ; Thu, 24 Sep 2020 08:28:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5FB1273682; Thu, 24 Sep 2020 12:28:49 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id CECC47368F for ; Thu, 24 Sep 2020 12:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600950649; 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=pmOyb2pn3FXg99iwCbjdc3glBUd3TFcLSOBKAfuZ5iI=; b=JwNQO4y10Ftha4VQOdhVAkkorSbNvlq3ll2eYzUnon5bto8Y1RiFivScYCU1Uah3rp6RV7 dP4tP+Kv0OgkD5O3PceXqidvlqK11q6/BKVbbf8M4Fn9THBHSBTWTm98zZkK7Nha9Zv9Ln QDvCIMKbXECsr+AjVaMvp9rRaTEAlv0= X-MC-Unique: Y1uVMjA9N4iJeLB0fg6RAA-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/6] docs: glib-adoption: remove stuff we alredy removed Date: Thu, 24 Sep 2020 14:28:37 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) https://www.redhat.com/archives/libvir-list/2020-May/msg00299.html Suggested-by: Daniel P. Berrang=C3=A9 Signed-off-by: J=C3=A1n Tomko --- docs/glib-adoption.rst | 69 ------------------------------------------ 1 file changed, 69 deletions(-) diff --git a/docs/glib-adoption.rst b/docs/glib-adoption.rst index 62ddd7c61d..91d0c66d91 100644 --- a/docs/glib-adoption.rst +++ b/docs/glib-adoption.rst @@ -25,72 +25,3 @@ used in new code, and their suggested GLib replacements: allocation APIs and GLib APIs within a single method. Keep the style consistent, converting existing code to GLib style in a separate, prior commit. -``virStrerror`` - The GLib ``g_strerror()`` function should be used instead, - which has a simpler calling convention as an added benefit. - -The following libvirt APIs have been deleted already: - -``VIR_AUTOPTR``, ``VIR_AUTOCLEAN``, ``VIR_AUTOFREE`` - The GLib macros ``g_autoptr``, ``g_auto`` and ``g_autofree`` - must be used instead in all new code. In existing code, the - GLib macros must never be mixed with libvirt macros within a - method, nor should they be mixed with ``VIR_FREE``. If - introducing GLib macros to an existing method, any use of - libvirt macros must be converted in an independent commit. -``VIR_DEFINE_AUTOPTR_FUNC``, ``VIR_DEFINE_AUTOCLEAN_FUNC`` - The GLib macros ``G_DEFINE_AUTOPTR_CLEANUP_FUNC`` and - ``G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC`` must be used in all new - code. Existing code should be converted to the new macros where - relevant. It is permissible to use ``g_autoptr``, ``g_auto`` on - an object whose cleanup function is declared with the libvirt - macros and vice-versa. -``VIR_AUTOUNREF`` - The GLib macros ``g_autoptr`` and - ``G_DEFINE_AUTOPTR_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``. - -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| deleted version | GLib version | N= otes | -+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ -| ``VIR_AUTOPTR`` | ``g_autoptr`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``VIR_AUTOCLEAN`` | ``g_auto`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``VIR_AUTOFREE`` | ``g_autofree`` | T= he GLib version does not use parentheses | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``VIR_AUTOUNREF`` | ``g_autoptr`` | T= he cleanup function needs to be defined | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``VIR_DEFINE_AUTOPTR_FUNC`` | ``G_DEFINE_AUTOPTR_CLEANUP_FUNC`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``VIR_DEFINE_AUTOCLEAN_FUNC`` | ``G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``VIR_STEAL_PTR`` | ``g_steal_pointer`` | `= `a =3D f(&b)`` instead of ``f(a, b)`` | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``VIR_RETURN_PTR`` | ``return g_steal_pointer`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``ARRAY_CARDINALITY`` | ``G_N_ELEMENTS`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``ATTRIBUTE_FALLTHROUGH`` | ``G_GNUC_FALLTHROUGH`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``ATTRIBUTE_FMT_PRINTF`` | ``G_GNUC_PRINTF`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``ATTRIBUTE_NOINLINE`` | ``G_GNUC_NO_INLINE`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``ATTRIBUTE_NORETURN`` | ``G_GNUC_NORETURN`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``ATTRIBUTE_RETURN_CHECK`` | ``G_GNUC_WARN_UNUSED_RESULT`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``ATTRIBUTE_SENTINEL`` | ``G_GNUC_NULL_TERMINATED`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``ATTRIBUTE_UNUSED`` | ``G_GNUC_UNUSED`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``VIR_STRDUP`` | ``g_strdup`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``VIR_STRNDUP`` | ``g_strndup`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ -| ``virStrerror`` | ``g_strerror`` | = | -+-------------------------------+--------------------------------------+--= -----------------------------------------+ --=20 2.26.2