From nobody Tue Apr 30 03:12:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554294905525203.64715103512185; Wed, 3 Apr 2019 05:35:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD383308213A; Wed, 3 Apr 2019 12:35:03 +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 A1A146014E; Wed, 3 Apr 2019 12:35:03 +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 B5B0D4ED25; Wed, 3 Apr 2019 12:35:02 +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 x33CZ10T007661 for ; Wed, 3 Apr 2019 08:35:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id CF1F46014B; Wed, 3 Apr 2019 12:35:01 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55CB56014E for ; Wed, 3 Apr 2019 12:34:58 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 3 Apr 2019 14:34:56 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] virjson: drop compatibility macros 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 03 Apr 2019 12:35:04 +0000 (UTC) Since commit 66460e3 dropped support for YAJL 1, we no longer need these. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Daniel P. Berrang=C3=A9 --- src/util/virjson.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/util/virjson.c b/src/util/virjson.c index bb4052ba81..1dceb746b9 100644 --- a/src/util/virjson.c +++ b/src/util/virjson.c @@ -34,8 +34,6 @@ # include # include =20 -# define yajl_size_t size_t -# define VIR_YAJL_STATUS_OK(status) ((status) =3D=3D yajl_status_ok) #endif =20 /* XXX fixme */ @@ -1615,7 +1613,7 @@ virJSONParserHandleBoolean(void *ctx, static int virJSONParserHandleNumber(void *ctx, const char *s, - yajl_size_t l) + size_t l) { virJSONParserPtr parser =3D ctx; char *str; @@ -1643,7 +1641,7 @@ virJSONParserHandleNumber(void *ctx, static int virJSONParserHandleString(void *ctx, const unsigned char *stringVal, - yajl_size_t stringLen) + size_t stringLen) { virJSONParserPtr parser =3D ctx; virJSONValuePtr value =3D virJSONValueNewStringLen((const char *)strin= gVal, @@ -1666,7 +1664,7 @@ virJSONParserHandleString(void *ctx, static int virJSONParserHandleMapKey(void *ctx, const unsigned char *stringVal, - yajl_size_t stringLen) + size_t stringLen) { virJSONParserPtr parser =3D ctx; virJSONParserStatePtr state; @@ -1824,7 +1822,7 @@ virJSONValueFromString(const char *jsonstring) =20 /* Yajl 2 is nice enough to default to rejecting trailing garbage. */ rc =3D yajl_parse(hand, (const unsigned char *)jsonstring, len); - if (!VIR_YAJL_STATUS_OK(rc) || + if (rc !=3D yajl_status_ok || yajl_complete_parse(hand) !=3D yajl_status_ok) { unsigned char *errstr =3D yajl_get_error(hand, 1, (const unsigned char*)jsons= tring, @@ -1935,7 +1933,7 @@ virJSONValueToBuffer(virJSONValuePtr object, { yajl_gen g; const unsigned char *str; - yajl_size_t len; + size_t len; int ret =3D -1; =20 VIR_DEBUG("object=3D%p", object); --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list