From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp62.i.mail.ru (smtp62.i.mail.ru [217.69.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 9786640F3AE for ; Wed, 24 Jun 2020 19:53:44 +0300 (MSK) From: Chris Sosnin Date: Wed, 24 Jun 2020 19:53:30 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v2 0/2] decNumber utilites for SQL List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, sergepetrenko@tarantool.org, v.shpilevoy@tarantool.org Changes in v2: - Instead of skipping whitespaces, allow FromString to parse valid beginning of the string and return pointer to the next character. Thus, we can check for whitespaces ourselves. This also requires lib/core changes: either pass a pointer to decimal_from_string and check for '\0' after every use, or refactor it so it works the same way and introduce something like strtodec. - Rename decIsWhole -> decIsInt. branch: https://github.com/tarantool/decNumber/tree/ksosnin/utilities-for-sql related issue: https://github.com/tarantool/tarantool/issues/4415 Chris Sosnin (2): Refactor decNumberFromString Add IsInt method for checking the fractional part of a number decNumber.c | 46 ++++++++++++++++++++++++++++++++++++++-------- decNumber.h | 27 ++++++++++++++------------- 2 files changed, 52 insertions(+), 21 deletions(-) -- 2.21.1 (Apple Git-122.3)