From dd04f52489f12310def17494ed535ecc89f2d041 Mon Sep 17 00:00:00 2001 From: swrup Date: Thu, 9 Oct 2025 16:23:42 +0200 Subject: [PATCH] add doc comment on "P"/"PS" struct --- src/binary_formats.ml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/binary_formats.ml b/src/binary_formats.ml index c2e45739..c84d0aec 100644 --- a/src/binary_formats.ml +++ b/src/binary_formats.ml @@ -1,10 +1,23 @@ (* https://docs.taler.net/core/api-common.html#binary-formats - numeric values are in network byte order (big endian) *) -(* TODO: ? - - some struct have a 'P' suffix, but are not defined in doc - we assume they are = to the un-suffixed ones - - some purpose (`TALER_SIGNATURE_XXX`) are missing or outdated(?) *) + +(* structs that are ‘packed’ and do not contain pointers and are + thus suitable for hashing or similar operations are distinguished + by adding a “P” at the end of the name. (NEW) Note that this convention + does not hold for the GNUnet-structs (yet). + + structs that are used with a purpose for signatures, + additionally get an “S” at the end of the name. + + (from https://docs.taler.net/taler-developer-manual.html) *) + +(* TODO + - check that our struct are well "packed" + - check that our struct correspond to the exchange's + - some purpose (`TALER_SIGNATURE_XXX`) are missing + exchange and gana master branch are not in sync + and we should use a specific git tag instead *) open Include