gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] 03/04: [util] API-change: parameter reordering for TALE


From: gnunet
Subject: [taler-exchange] 03/04: [util] API-change: parameter reordering for TALER_age_commitment_proof_free
Date: Fri, 06 Dec 2024 16:48:40 +0100

This is an automated email from the git hooks/post-receive script.

oec pushed a commit to branch master
in repository exchange.

commit 3b259fc8ecf9f10e4acd703de76b176926ad1d4b
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Fri Dec 6 16:19:40 2024 +0100

    [util] API-change: parameter reordering for TALER_age_commitment_proof_free
---
 src/include/taler_crypto_lib.h             | 8 +++-----
 src/testing/testing_api_cmd_age_withdraw.c | 8 +++-----
 src/util/Makefile.am                       | 2 +-
 src/util/age_restriction.c                 | 6 +++---
 4 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index aaa74887f..30d90a054 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -6255,15 +6255,13 @@ TALER_age_commitment_proof_duplicate (
 /**
  * @brief helper function to copy a struct TALER_AgeCommitmentProof
  *
- * @param[in] acp The original age commitment proof
  * @param[out] nacp The struct to copy the data into, with freshly allocated 
and copied keys.
+ * @param[in] acp The original age commitment proof
  */
-/* FIXME: API flaw: arguments of this _copy are swapped with
-   the argument order for the other _copy() APIs... */
 void
 TALER_age_commitment_proof_deep_copy (
-  const struct TALER_AgeCommitmentProof *acp,
-  struct TALER_AgeCommitmentProof *nacp);
+  struct TALER_AgeCommitmentProof *nacp,
+  const struct TALER_AgeCommitmentProof *acp);
 
 /**
  * @brief For age-withdraw, clients have to prove that the public keys for all
diff --git a/src/testing/testing_api_cmd_age_withdraw.c 
b/src/testing/testing_api_cmd_age_withdraw.c
index 4cab78b7f..260febdf6 100644
--- a/src/testing/testing_api_cmd_age_withdraw.c
+++ b/src/testing/testing_api_cmd_age_withdraw.c
@@ -162,7 +162,7 @@ struct AgeWithdrawState
 };
 
 /**
- * Callback for the "age-withdraw" ooperation;  It checks that the response
+ * Callback for the "age-withdraw" operation;  It checks that the response
  * code is expected and store the exchange signature in the state.
  *
  * @param cls Closure of type `struct AgeWithdrawState *`
@@ -196,11 +196,9 @@ age_withdraw_cb (
     for (size_t n = 0; n < aws->num_coins; n++)
     {
       aws->coin_outputs[n].details = response->details.ok.coin_details[n];
-      /* FIXME: API flaw: arguments of this _copy are swapped with
-         the argument order for the other _copy() APIs... */
       TALER_age_commitment_proof_deep_copy (
-        &response->details.ok.coin_details[n].age_commitment_proof,
-        &aws->coin_outputs[n].details.age_commitment_proof);
+        &aws->coin_outputs[n].details.age_commitment_proof,
+        &response->details.ok.coin_details[n].age_commitment_proof);
       TALER_denom_ewv_copy (
         &aws->coin_outputs[n].details.alg_values,
         &response->details.ok.coin_details[n].alg_values);
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index cad54b8b9..88d7257a4 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -127,7 +127,7 @@ libtalerutil_la_LIBADD = \
   -lm
 
 libtalerutil_la_LDFLAGS = \
-  -version-info 4:0:0 \
+  -version-info 5:0:0 \
   -no-undefined
 
 
diff --git a/src/util/age_restriction.c b/src/util/age_restriction.c
index c2a7fc07c..352e4c22a 100644
--- a/src/util/age_restriction.c
+++ b/src/util/age_restriction.c
@@ -508,15 +508,15 @@ TALER_age_commitment_proof_duplicate (
 
   nacp = GNUNET_new (struct TALER_AgeCommitmentProof);
 
-  TALER_age_commitment_proof_deep_copy (acp,nacp);
+  TALER_age_commitment_proof_deep_copy (nacp, acp);
   return nacp;
 }
 
 
 void
 TALER_age_commitment_proof_deep_copy (
-  const struct TALER_AgeCommitmentProof *acp,
-  struct TALER_AgeCommitmentProof *nacp)
+  struct TALER_AgeCommitmentProof *nacp,
+  const struct TALER_AgeCommitmentProof *acp)
 {
   GNUNET_assert (NULL != acp);
   GNUNET_assert (__builtin_popcount (acp->commitment.mask.bits) - 1 ==

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]