[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: update PQ implementation to allo
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: update PQ implementation to allow for NULLable amounts |
Date: |
Wed, 16 Jun 2021 17:08:35 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new ae7b5951 update PQ implementation to allow for NULLable amounts
ae7b5951 is described below
commit ae7b5951c1bcee108a3ee03bf97f426640aa996f
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Jun 16 17:08:30 2021 +0200
update PQ implementation to allow for NULLable amounts
---
src/pq/pq_result_helper.c | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c
index c1c8fe5e..3d252890 100644
--- a/src/pq/pq_result_helper.c
+++ b/src/pq/pq_result_helper.c
@@ -38,7 +38,7 @@
* #GNUNET_NO if at least one result was NULL
* #GNUNET_SYSERR if a result was invalid (non-existing field)
*/
-static int
+static enum GNUNET_GenericReturnValue
extract_amount_nbo_helper (PGresult *result,
int row,
const char *currency,
@@ -87,7 +87,6 @@ extract_amount_nbo_helper (PGresult *result,
row,
frac_num)) )
{
- GNUNET_break (0);
return GNUNET_NO;
}
/* Note that Postgres stores value in NBO internally,
@@ -121,7 +120,7 @@ extract_amount_nbo_helper (PGresult *result,
* #GNUNET_NO if at least one result was NULL
* #GNUNET_SYSERR if a result was invalid (non-existing field)
*/
-static int
+static enum GNUNET_GenericReturnValue
extract_amount_nbo (void *cls,
PGresult *result,
int row,
@@ -132,7 +131,7 @@ extract_amount_nbo (void *cls,
const char *currency = cls;
char *val_name;
char *frac_name;
- int ret;
+ enum GNUNET_GenericReturnValue ret;
if (sizeof (struct TALER_AmountNBO) != *dst_size)
{
@@ -196,7 +195,7 @@ TALER_PQ_result_spec_amount_nbo (const char *name,
* #GNUNET_NO if at least one result was NULL
* #GNUNET_SYSERR if a result was invalid (non-existing field)
*/
-static int
+static enum GNUNET_GenericReturnValue
extract_amount (void *cls,
PGresult *result,
int row,
@@ -209,7 +208,7 @@ extract_amount (void *cls,
char *val_name;
char *frac_name;
struct TALER_AmountNBO amount_nbo;
- int ret;
+ enum GNUNET_GenericReturnValue ret;
if (sizeof (struct TALER_AmountNBO) != *dst_size)
{
@@ -280,7 +279,7 @@ TALER_PQ_result_spec_amount (const char *name,
* #GNUNET_NO if at least one result was NULL
* #GNUNET_SYSERR if a result was invalid (non-existing field)
*/
-static int
+static enum GNUNET_GenericReturnValue
extract_json (void *cls,
PGresult *result,
int row,
@@ -389,7 +388,7 @@ TALER_PQ_result_spec_json (const char *name,
* #GNUNET_YES if all results could be extracted
* #GNUNET_SYSERR if a result was invalid (non-existing field or NULL)
*/
-static int
+static enum GNUNET_GenericReturnValue
extract_round_time (void *cls,
PGresult *result,
int row,
@@ -413,10 +412,7 @@ extract_round_time (void *cls,
if (PQgetisnull (result,
row,
fnum))
- {
- GNUNET_break (0);
- return GNUNET_SYSERR;
- }
+ return GNUNET_NO;
GNUNET_assert (NULL != dst);
if (sizeof (struct GNUNET_TIME_Absolute) != *dst_size)
{
@@ -472,7 +468,7 @@ TALER_PQ_result_spec_absolute_time (const char *name,
* #GNUNET_YES if all results could be extracted
* #GNUNET_SYSERR if a result was invalid (non-existing field or NULL)
*/
-static int
+static enum GNUNET_GenericReturnValue
extract_round_time_nbo (void *cls,
PGresult *result,
int row,
@@ -496,10 +492,7 @@ extract_round_time_nbo (void *cls,
if (PQgetisnull (result,
row,
fnum))
- {
- GNUNET_break (0);
- return GNUNET_SYSERR;
- }
+ return GNUNET_NO;
GNUNET_assert (NULL != dst);
if (sizeof (struct GNUNET_TIME_AbsoluteNBO) != *dst_size)
{
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: update PQ implementation to allow for NULLable amounts,
gnunet <=