From nobody Sat May 4 22:03:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1642414954; cv=none; d=zohomail.com; s=zohoarc; b=eARTmC9FFrseMe2owiHAEYHrLM6/7462dbvlQJZd4jLS0f0ZZW5XCwlCXPjf0tVrCbAYWgcmGUA3RIEApy9sZEzaP6FlrIUiHuTrPSv98dxpOYjEu4OEELgm2aPpp8+adFA6xLaYPoPC9WZes2T+bBuEZIyy2YbIwoGTjL/m7TI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642414954; h=Content-Type:Content-Transfer-Encoding:Cc: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=oNhFxlUvYYwdLdZKib8pcc9BOF1srYcr0zr8tYshfWk=; b=btPLInDB/q0LHXHp9oMl3GGVozR3z6hEkpyKG68AGBThc4n45P1JM2WCFNsR0ovWpiLBNCvQundToJ3bwc5WnNMFze8net2b88mVeErpbbwL0ahUe4fZW3cVyaA2z8UqPhd3mKGac/9jiy/gfVRK1rMbMBZszWy/qKoBTHhK1qw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 164241495434398.5728418313962; Mon, 17 Jan 2022 02:22:34 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-212-M3zxDc48Mae6PK41IjzaPA-1; Mon, 17 Jan 2022 05:22:31 -0500 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 AA689100C661; Mon, 17 Jan 2022 10:22:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6148E7CAD1; Mon, 17 Jan 2022 10:22:26 +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 CD0CF4BB7C; Mon, 17 Jan 2022 10:22:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HAJYjO006192 for ; Mon, 17 Jan 2022 05:19:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8B893752C1; Mon, 17 Jan 2022 10:19:34 +0000 (UTC) Received: from work.redhat.com (unknown [10.39.193.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5528752BC; Mon, 17 Jan 2022 10:19:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642414953; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=oNhFxlUvYYwdLdZKib8pcc9BOF1srYcr0zr8tYshfWk=; b=G4yuwcBdrJYAIQXxc1xiRZcDrB/0ucVwFOBNX0fTd+bn5P+ZCgi8zCQUAIdYxf6+dzxPl5 KCow4TTvTNQxDmjwnga6sMlIdLDq6Y27dp/Hew1XrQA9sYeGYaoUPxfRcqq+6JSs8AmVm1 T86fxtCfvcPJ/pmAO84sxo/ZIHcqJos= X-MC-Unique: M3zxDc48Mae6PK41IjzaPA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/2] docs: coding-style: Clarify on virXXXPtr types Date: Mon, 17 Jan 2022 11:19:02 +0100 Message-Id: <20220117101903.99900-2-twiederh@redhat.com> In-Reply-To: <20220117101903.99900-1-twiederh@redhat.com> References: <20220117101903.99900-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642414956320100001 Content-Type: text/plain; charset="utf-8" This partially reverts commit 9ccbed6afb. Signed-off-by: Tim Wiederhake --- docs/coding-style.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/coding-style.rst b/docs/coding-style.rst index 37e6009db4..ee4d551805 100644 --- a/docs/coding-style.rst +++ b/docs/coding-style.rst @@ -53,10 +53,15 @@ Struct type names All structs should have a 'vir' prefix in their typedef name, and each following word should have its first letter in uppercase. The struct name should be the same as the typedef - name with a leading underscore. + name with a leading underscore. For types that are part of the + public API, a second typedef should be given for a pointer to + the struct with a 'Ptr' suffix. Do not introduce new such + typedefs for internal types. + :: =20 typedef struct _virHashTable virHashTable; + typedef virHashTable *virHashTablePtr; struct _virHashTable { ... }; --=20 2.31.1 From nobody Sat May 4 22:03:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1642415055; cv=none; d=zohomail.com; s=zohoarc; b=B0eB8YVkJUFc/HVXPQC1hrSe7wbnCNkAAMxUPkV3KfK4vyEoWjS2bmYQWU8IkmDfp9hhZdypCiqVQ40lL4UIjbJrTRXKqHtlxXeGE3d2E1l3eLEMMyiXO/s2mM1LTsQIt4cOw026CUrihAy+FlIJqdH0wuuT3xoeavMCO+5YgAY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642415055; h=Content-Type:Content-Transfer-Encoding:Cc: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=BmJDS0mn3IlmisZ/ZDwA2RGGW9iZB+SWZmBHPFy0vgY=; b=N3Pxe7LXnVVq3XEL8i9t7GtRc4XLuYRRh0H+oMlejszpcgO5CjCYVro4O69AU9JYZ/dIbNSW1DOLo+exoD3l6uHIrWHVHUPBz5cVYg8K2Oz3vDL1rK2jp/qEqXW9qFPLXjXALt9WFzLlyl2yZfWM77f8HtSmwn6olhc6zpiV0qI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1642415055014103.33562855095931; Mon, 17 Jan 2022 02:24:15 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-385-U_oWf5xpPKi3uLV_PVSPkg-1; Mon, 17 Jan 2022 05:24:12 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F46F100C66A; Mon, 17 Jan 2022 10:24:07 +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 2703122DEC; Mon, 17 Jan 2022 10:24:07 +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 B693B1809CB8; Mon, 17 Jan 2022 10:24:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HAKUTD006254 for ; Mon, 17 Jan 2022 05:20:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id B0119752B4; Mon, 17 Jan 2022 10:20:30 +0000 (UTC) Received: from work.redhat.com (unknown [10.39.193.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0586F752C3; Mon, 17 Jan 2022 10:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642415054; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=BmJDS0mn3IlmisZ/ZDwA2RGGW9iZB+SWZmBHPFy0vgY=; b=PGxerBzBz0nU0dcJwRbWOEO/8hhQ0sPDrFMwakamSs/Ups/TznO05velrYVS5/6zAr/Zc2 N0vo02wFmuSdQUCqr7CCL9iqaxScnrBK9g8tSoAC2h5TWUXuuj/kssYVjfQVQ8/ukRsSed RSNWl7RM3BOd4OwAg5DjXS6+0u0FiCk= X-MC-Unique: U_oWf5xpPKi3uLV_PVSPkg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/2] docs: coding-style: One variable declaration per line Date: Mon, 17 Jan 2022 11:19:03 +0100 Message-Id: <20220117101903.99900-3-twiederh@redhat.com> In-Reply-To: <20220117101903.99900-1-twiederh@redhat.com> References: <20220117101903.99900-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.84 on 10.5.11.23 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642415056731100001 Content-Type: text/plain; charset="utf-8" This was not mentioned before. Signed-off-by: Tim Wiederhake --- docs/coding-style.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/coding-style.rst b/docs/coding-style.rst index ee4d551805..01f1e25127 100644 --- a/docs/coding-style.rst +++ b/docs/coding-style.rst @@ -600,6 +600,19 @@ calling another function. ... } =20 +Prefer variable definitions on separate lines. This allows for smaller, +easier to understand diffs when changing them. Define variables in the +smallest possible scope. + +:: + + GOOD: + int count =3D 0; + int nnodes; + + BAD: + int count =3D 0, nnodes; + Attribute annotations --------------------- =20 --=20 2.31.1