summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2024-09-13 13:50:56 -0400
committerChuck Lever <chuck.lever@oracle.com>2024-09-20 19:31:41 -0400
commit509abfc7a0ba66afa648e8216306acdc55ec54ed (patch)
tree496f544101fe68e1db1e91b2be0a0503990f5f36 /include
parentfed8a17c61ffa2ba53dc749068b6f07ecf40e3bf (diff)
downloadlwn-509abfc7a0ba66afa648e8216306acdc55ec54ed.tar.gz
lwn-509abfc7a0ba66afa648e8216306acdc55ec54ed.zip
xdrgen: Prevent reordering of encoder and decoder functions
I noticed that "xdrgen source" reorders the procedure encoder and decoder functions every time it is run. I would prefer that the generated code be more deterministic: it enables a reader to better see exactly what has changed between runs of the tool. The problem is that Python sets are not ordered. I use a Python set to ensure that, when multiple procedures use a particular argument or result type, the encoder/decoder for that type is emitted only once. Sets aren't ordered, but I can use Python dictionaries for this purpose to ensure the procedure functions are always emitted in the same order if the .x file does not change. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions