From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id C194E24E96 for ; Mon, 21 Jan 2019 04:46:51 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EaYbrrrDRz6b for ; Mon, 21 Jan 2019 04:46:51 -0500 (EST) Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 1C54524E8B for ; Mon, 21 Jan 2019 04:46:50 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v1 1/1] implement mp_stack class References: <9613f79e65d9838763422aae0bfb3ca9e2901a32.1547645639.git.kshcherbatov@gmail.com> <20190117115843.nqellm5mmsglqnlf@tkn_work_nb> <842c55cd-5d3f-e857-42f4-94d648c88273@tarantool.org> <20190117163409.hvga32kxxgcc5sat@tkn_work_nb> <1ba698d1-8450-f2d3-7717-11adbf0d5f4f@tarantool.org> From: Kirill Shcherbatov Message-ID: Date: Mon, 21 Jan 2019 12:46:49 +0300 MIME-Version: 1.0 In-Reply-To: <1ba698d1-8450-f2d3-7717-11adbf0d5f4f@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, Alexander Turenko diff --git a/test/msgpuck.c b/test/msgpuck.c index 6d5a7a5..cb23ec3 100644 --- a/test/msgpuck.c +++ b/test/msgpuck.c @@ -1108,7 +1108,7 @@ test_mpstack() char tuple[1024]; char *wptr = tuple; - const char *descr = "{\"first\", {\"key1\": \"one\", \"key2\": {2}}, {3}}"; + const char *descr = "[\"first\", [\"key1\": \"one\", \"key2\": [2]], [3]]"; wptr = mp_encode_array(wptr, 3); wptr = mp_encode_str(wptr, "first", 5); wptr = mp_encode_map(wptr, 2); @@ -1139,7 +1139,7 @@ test_mpstack() mp_decode_array(&rptr) : mp_decode_map(&rptr); mp_stack_push(&mp_stack, type, size); - wptr += sprintf(wptr, "{"); + wptr += sprintf(wptr, "["); } else { if (type == MP_STR) { const char *str = mp_decode_str(&rptr, &len); @@ -1155,7 +1155,7 @@ test_mpstack() } while (mp_stack_advance(&mp_stack)) { mp_stack_pop(&mp_stack); - wptr += sprintf(wptr, "}"); + wptr += sprintf(wptr, "]"); if (mp_stack_is_empty(&mp_stack)) goto end; if (mp_stack_top_is_internal_item(&mp_stack))