From patchwork Fri Jul 12 15:25:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 1959938 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=hhFlcntr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::1038; helo=mail-pj1-x1038.google.com; envelope-from=swupdate+bncbdk7hq7yrekrbfewyw2amgqexnrqebi@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-pj1-x1038.google.com (mail-pj1-x1038.google.com [IPv6:2607:f8b0:4864:20::1038]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLFml29lxz1xqx for ; Sat, 13 Jul 2024 01:26:15 +1000 (AEST) Received: by mail-pj1-x1038.google.com with SMTP id 98e67ed59e1d1-2caaaf5870asf1867536a91.0 for ; Fri, 12 Jul 2024 08:26:15 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1720797973; cv=pass; d=google.com; s=arc-20160816; b=JDSwsjGiBpVxmKlMoiush2wyI7UC7ZouaiEkNgRF6IFuxz/FdU9LCkcQ/cWzS2L0B5 48uqwa0cgiz74B2VurzJdhlL16iuvC3Ou+o9sCS0WBoIr5qffcTkAn6oROiTAmlfF5dl b7+Hkm7ObcCby2S/YUFXJ+pC2PARMbnemAkuA6aSJMDgU3qox2cbc7WtAwOnD45R4XM0 09aGdN03cMigICpYxzR7gpV3LmqEW5zvFy/dxFqQseS2w7t6rDKOWgKPhCimjToAIWd0 3CTevESPciyScjakIwxcKJRlXog8c6nzBU4UCXOHXLmMvM2uxkQvRaPX0k5UeNOq8ZIR 5R4g== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=vcAbxy4cuuacAYNQYVu9Zqjfg/CA+Qlr1oPmxySuzz0=; fh=OVVKrISzIgVdJm4IleRSA/gfxXJWbGatv4gS+KSHo+Y=; b=NilQcwI6YBoSGI5y66sH5QskS3OEtWNantpJCtOIq97q2y2DRM8Y5Mc4Dg5ujTosQ5 2lovLosfAiBkFewybydod7wPdT7/Z/xAKFdKN/rrKsrlfs+0uW2ly8btuJYSvWmfpgWA BvE57xGZRHa4mQE8iynYy8kyr963bBMIbblAEqfIB/8s9gsa5xDatxk3GWSPGE1hCwmc p0KWFWfzkRnojKCXB0rEme+3B5j+PmK9Uqa/6rHliw8edr8H4JHaH0x2DL/L+Yzzkzpg XrNrpfh0jeYqZ/mc5/JVDZah+u7ZZAD1O7nYWfZpfDasIhWyTG5A6KEFH08GizsYZzsD 7How==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=hOdsDfDw; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720797973; x=1721402773; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=vcAbxy4cuuacAYNQYVu9Zqjfg/CA+Qlr1oPmxySuzz0=; b=hhFlcntrHiCr6jhOqiR3sQllpvrP9gr4KyNiZ58h4YMTPFEcFdbMr8rlJ5rHgkMzkq 8VkE9bWRGg/qmWIKLI62Ca32l/Uk/qbcFvFtrmaW9LfFLzMubCVEGL2gulE5E+7f4kYq ZGw9Sl+qgl83sKm4eYsqOU+WkH8NtvHU5iH+eO/OMFRWoPLL7o9GHfldSrsj7zHuAPkt nUwFrAVaNuRt/sF+xVg1riJ+I3xE3ofiz5LeeuT/H+cgsll1tTlOrIXVaRJ53vxEg+9r h1lsQ0najS5DEhpvdI5XI7tE5SuLXmQJvE2QFBMu3Uhki7LFMEvxOnpINmm4W/KcwVe6 +w3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720797973; x=1721402773; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=vcAbxy4cuuacAYNQYVu9Zqjfg/CA+Qlr1oPmxySuzz0=; b=dyMi3GfIW3xE/XejqHihR7Fm9c7tyjYnN4xMeQ+WYrND0Ba7v9bP2J/byk/sf9WwEq ni5KKjF2Du7PElmlLwCxPuiF5YiVGOYC9jikVM4l0UYJtAyaZ7jlhjjtdStp9cLEjISK FF23fQ6uokZXWx8IKWKwjY1PBLj9hIJTkkLKXqO79TlpESgKBBjV3zvLtCDEKr2iw+M+ J5/xmke1Uk9OQgT+p5PUKdlPXHXQlidK2F4dAb72hJ3Q8UB5DPkNA3FmwC/S3L08VRjB wrDRQYqCh1d3bAolQ+O0P2+Och2M24tK0D3v1PelqKqAbj5CFXoUvqIoHvZaYhmuxWVU CEIQ== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=3; AJvYcCV8ce62DvsdPCscZ4TJaVIzHpCr10v1QLKVaFmXFd8RFetJbRUAf0TbbgwHsIDAHs5kWTPS70uObrVudI6CQbbcP4YD0wLn31WycE6rcQ== X-Gm-Message-State: AOJu0YxHjavsiBT32j8Q+xN9Q7AMyL7x9nOOaeX5HRhSJNag6GTqNsoc Q4ATImaAQsd2FDB88VTBSeUvAl3VZqGszKI8kjzXUyN0qp00cU5V X-Google-Smtp-Source: AGHT+IHlN4tjgYokDCkjzQAxtmvVovzPLcwCK1B164K5azfO3xHget0TQRyUMpoYP4zaP7oJntnfQg== X-Received: by 2002:a17:90a:a414:b0:2c9:75a4:cc71 with SMTP id 98e67ed59e1d1-2ca35d3ad17mr9584559a91.32.1720797972942; Fri, 12 Jul 2024 08:26:12 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:90a:e154:b0:2c8:14c7:beca with SMTP id 98e67ed59e1d1-2ca9fa73c27ls365313a91.0.-pod-prod-03-us; Fri, 12 Jul 2024 08:26:09 -0700 (PDT) X-Received: by 2002:a05:6a21:999d:b0:1c2:a0b2:e69 with SMTP id adf61e73a8af0-1c2a0b2110bmr11995462637.33.1720797969571; Fri, 12 Jul 2024 08:26:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720797969; cv=pass; d=google.com; s=arc-20160816; b=ZmrDkwyeULZdxN2Zun+Sl8qbUzGu1UFOhepBDoJo/QZ3J4hGNKVkhpstjxRrj2b4mc eZzwKmWaqYJOZl0kkaiwoEShVFoqpgaXM3PgCWYjydoviLD99qS3NottQtK8zoBTSuJT 5gBlhiBVs1PZSGdJ36nBuWadMVrIUw5xHVEm54gTfEnJ7lmcRKlpu9YIKS8KX1wiAFJW OR5m7bcLD7url6HeUcASMFJWf3xXvN/1jUlnQDGOMxrLKwRwFiP9EUOZjC/BrDNjvpkp z0xfcTiWz2+wyXt/ZzgAMGFxbRBMbor5k23aC0r/KmI+Y1NqM9Q+ZSpX/NYWShSEwwQR Up2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YD2jUrElGZjuKN01FAeJF//nYfMVMs4/vu//zel846A=; fh=Zaas7zo9QAZR51NXyZEDKjGEOyAL/jH6m/nrwgSdorI=; b=qSwg2FhmDITEmkQXbhJpl3KYmWUv7sVSoP9hiNvMCpTL/23MuKngBBjzfugHB9Zi3J qRiH71H99NCJLCbzYrup0SzGZ6GRz7wYzTFMxPL756k4YaqDLx6xZ9vwuXTcZjP+cBZO 4crPad3zJ5odED4jFSeX2ezEi1QJT/EyqYWeCsN8y0m+4sz8PvF3Lx+BbLqMJdZltmFL 0TqhSUJDSoFAWeOF/6GVvyrqhkRJsTPumKe53JP6SrwgRceNeWXwtEYSPsZzOSxKNU34 P22bIXizjP4k4GRKM1si2m7pzJAtArAnKIlVyD9FnYtb5MClh88C7Q3JKJwgKPcSKozf yi4A==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=hOdsDfDw; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20600.outbound.protection.outlook.com. [2a01:111:f403:2613::600]) by gmr-mx.google.com with ESMTPS id d9443c01a7336-1fbb6ac00ccsi3383845ad.8.2024.07.12.08.26.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jul 2024 08:26:09 -0700 (PDT) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) client-ip=2a01:111:f403:2613::600; ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eO2gQ9b8287QOcsorAbW8ur7HZYi9y3+iQm9PlTtu246DDfj42Ym8mSaSeQd0AADvxbh5SVRwPS/fr/NmKipyoqZnKRmzH0bIoxYEiUGj62AE2kzh/5BcDY8GfxM3uFlFr5ehGndqqrTq6QXuY9A+rxV1ci2zbOVFMdFEvkxJ9T6X+w8Eqau0sNxOjHwLvdSaMUE/f2NkfZDMSCKdL1Ugc0HSNX0xf6K3VhputtD5+QV07kpi1lFK3SBSdt/wynM51zY37puSrS8HFmEYzsgIAbsA68msvPz2hghO7JB3hej1S+6HkDPQt+nk7hhiK8CRMubrLFHUAUNeah803H2gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YD2jUrElGZjuKN01FAeJF//nYfMVMs4/vu//zel846A=; b=kSwe64BUOC9zHtOiBuBrPmQfUqsdybdLv/Zy5/DFkWZFl/1kZaO2I50gUHFNpj5NifRYgAb4O5igmTVcxe6vHwTBXxDnofSvFm7UsXb51iWCHisG3t6jOXJRgO0wtQjayr0VU4SHqMd+8QcWvxIdxMHLIB7cIjy9fjdbpdeAoLpBBvN7gY+R9sOZcAq90N1TSaunuCy/F0l0wyWE8OAUO5c/8QKfQKoJ8eR5zj7x15gYmjPkTtdlz29ReUT026kjJe4T/bYVpCPWgh5hj7quZ+ojshbJ5d4Bg65JnuB4gPZH1+KP4fjGX9p2ssImrMBGUc2/qmXXb43DQzhZGnSqPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=arri.de; dmarc=fail (p=none sp=none pct=100) action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) Received: from DU2PR04CA0275.eurprd04.prod.outlook.com (2603:10a6:10:28c::10) by PA4PR07MB7071.eurprd07.prod.outlook.com (2603:10a6:102:d6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.8; Fri, 12 Jul 2024 15:26:05 +0000 Received: from DB5PEPF00014B91.eurprd02.prod.outlook.com (2603:10a6:10:28c:cafe::a0) by DU2PR04CA0275.outlook.office365.com (2603:10a6:10:28c::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23 via Frontend Transport; Fri, 12 Jul 2024 15:26:05 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by DB5PEPF00014B91.mail.protection.outlook.com (10.167.8.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.17 via Frontend Transport; Fri, 12 Jul 2024 15:26:03 +0000 Received: from N9W6SW14.arri.de (192.168.54.130) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Fri, 12 Jul 2024 17:26:03 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [swupdate] [PATCH v2 06/10] parser: GET_FIELD_*: add type safety Date: Fri, 12 Jul 2024 17:25:53 +0200 Message-ID: <20240712152553.4407-1-ceggers@arri.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240712152253.3702-1-ceggers@arri.de> References: <20240712152253.3702-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.130] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B91:EE_|PA4PR07MB7071:EE_ X-MS-Office365-Filtering-Correlation-Id: 4c9cb1fa-dba9-4c67-3683-08dca286f156 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: ZMf59TNy1BnO9fQJMcIcWr6CMXkpi/R0rZt3un/Oo9PLQBoc0TzHFnrjijzkJEUjlc2hJ+CxNQzIUpP9PFE8mLcUK/ugF6CqExuuTGioXqHT7/io5ckjgHUE9Ad6IULrAl9lzEBKGT6tOWSr40v8Undsr72hiDDJeCkDo4xxV4AGshPb8zQEddQolyfeZhutt+F3w6YnBD4395VG+JHnyYWLpkihxSnWDlNYW7wbxPS7R3gLzkXRIfYcIPt9dI+k+/vayAgWD4i6sRfjLmMHttScpYdFPPpleWFa0Z/1GNrL/croPit20zz3As+TRa8LFwmeGMwuh9PIB1zVuftvSKjWr2tYTtfcHIHHDT+foZxQTg7RwzMyR1t5+RnVHr0UDzBYSgcXB3u6pZG6oQRF81A4jmjmx/86cXiGZjge9ciCXUiiKqreKVeoTqCxw9E0UHKNaeb9ux3fuJjblFNvyX+QHWxyHFtzwi5DN+mOS6MXK2w5lKSTQ4jrnzp8DK0j0z1km3fuyCRNL7I+NeYL2P2792O4zQdxVywPF/k2/VsCB+Ko25D5kIOUIBl1yXQ7SSDtVH2e9S3LWfLieSRYQ9Oc7+xRvC9vn+Czq6dzbO1PKz2Ir0W6T0rxiigVyUUQodQIrh16fGroYOgPxhvUCUj0yBc6ppEO8Ak/iBsdoIcxL3eULK165Yu6kNJqUogOsuZz704zxQJY9YckYHEQ1wPkaH0h8ovvQksWWvrljngtZaCKZmQC7DnSGdHVw4kQUUQ0iURBZAnabfYGA57N0K7vjxXs5YJMnsBa40g5iVepUUJhHXXAC32hEymCKQDqWGV6lh5yGB18vd0LfEuvSmPsuGShYAZpTyJwbOQadJ2k603VJvfoKnVDp1rNM4FV61ocaYX5K7HAqYBZxiu2lZ0r9QKLBCus9BBtzuqRH7frT37F+ELLuB75dgqXUz+tZp87REa32Ko2gzAymaP1Q6vmuC2Erb5BRcZ0OWaobCJOyXW9LajfJCrULpENfY8XqC4wyr9jvTH+Lms9I2KEJ3GlWLKOsPtJvdw9Vi3L/uK3uAD5uRd32k3sWiZgu83aUxT07povl94CLh7wvZOoLv6yZC+zJaTdCD/r0WMr14c3pAdo/u2cIz7FmhfeHh7RoDyzO0dgNyVwjc3LutlOoiz5J2C6DlvdXbnun76YEiY/7uAsLrgBvQZs9Rgb22B/VUP/xNa4OW0QXlDO6Swxys7rSMN/MY9nrVd2YyV0X61o2KJIA0Wi6PoIcpHJuzNqOdGYv1zb7+xxMaq50nKn4uTAebCWV3Ue+K7Jn2N1xwDLtspXoMwnLpPO9pg7/Jflknxak5ujDFvCOfC+5VbwC4zEJFerWV6il3tuaB+BnSX4bqPcFnQAod4hH/XRz0ewVKByO/fOg/YL4Wu7CramFMe+/AQ/yZtK93tfQM4d9lp9HjPbgzJZAbbUj+xWsPAe X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 15:26:03.7263 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4c9cb1fa-dba9-4c67-3683-08dca286f156 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B91.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR07MB7071 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@arri.de header.s=selector1 header.b=hOdsDfDw; arc=pass (i=1); spf=pass (google.com: domain of ceggers@arri.de designates 2a01:111:f403:2613::600 as permitted sender) smtp.mailfrom=CEggers@arri.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Add separate inline functions in order to ensure that compatible pointers are supplied. Signed-off-by: Christian Eggers Acked-by: Stefano Babic --- include/parselib.h | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/include/parselib.h b/include/parselib.h index 4a8717e0aad2..a49202a4b40f 100644 --- a/include/parselib.h +++ b/include/parselib.h @@ -65,6 +65,26 @@ void *find_root(parsertype p, void *root, const char **nodes); void *get_node(parsertype p, void *root, const char **nodes); bool set_find_path(const char **nodes, const char *newpath, char **tmp); +static inline void get_field_bool(parsertype p, void *e, const char *path, bool *dest) +{ + get_field(p, e, path, dest, TYPE_BOOL); +} + +static inline void get_field_int(parsertype p, void *e, const char *path, int *dest) +{ + get_field(p, e, path, dest, TYPE_INT); +} + +static inline void get_field_int64(parsertype p, void *e, const char *path, long long *dest) +{ + get_field(p, e, path, dest, TYPE_INT64); +} + +static inline void get_field_float(parsertype p, void *e, const char *path, double *dest) +{ + get_field(p, e, path, dest, TYPE_DOUBLE); +} + #define GET_FIELD_STRING(p, e, name, d) \ get_field_string_with_size(p, e, name, d, sizeof(d)) @@ -74,13 +94,13 @@ bool set_find_path(const char **nodes, const char *newpath, char **tmp); } while (0) #define GET_FIELD_BOOL(p, e, path, dest) \ - get_field(p, e, path, dest, TYPE_BOOL) + get_field_bool(p, e, path, dest) #define GET_FIELD_INT(p, e, path, dest) \ - get_field(p, e, path, dest, TYPE_INT) + get_field_int(p, e, path, dest) #define GET_FIELD_INT64(p, e, path, dest) \ - get_field(p, e, path, dest, TYPE_INT64) + get_field_int64(p, e, path, dest) #define GET_FIELD_FLOAT(p, e, path, dest) \ - get_field(p, e, path, dest, TYPE_FLOAT) + get_field_float(p, e, path, dest)