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 47E1B2552A for ; Tue, 2 Apr 2019 03:52:20 -0400 (EDT) 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 tsGAYU-vr93u for ; Tue, 2 Apr 2019 03:52:20 -0400 (EDT) Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (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 EF30425443 for ; Tue, 2 Apr 2019 03:52:19 -0400 (EDT) Date: Tue, 2 Apr 2019 10:52:17 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 07/13] sql: arithmetic functions support big integers Message-ID: <20190402075217.GF25072@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Cc: szudin@tarantool.org * n.pettik [19/03/25 18:13]: > > +enum arithmetic_result sqlAddInt64(i64 *, bool, i64, bool); > > +enum arithmetic_result sqlSubInt64(i64 *, bool, i64, bool); > > +enum arithmetic_result sqlMulInt64(i64 *, bool, i64, bool); > > +enum arithmetic_result sqlDivInt64(i64 *, bool, i64, bool); > > +enum arithmetic_result sqlRemInt64(i64 *, bool, i64, bool); I think we should not introduce a separate enum for this, the convention should be: -1 + diag_set for errors - the argument list should be designed in a way to make the functions composable. E.g. if you input bool is_signed as input, it should return bool is_signed for output. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov