Commit fbc64c7
committed
Add opaque parity type
Two functions in the FFI secp code return and accept a parity int.
Currently we are manually converting this to a bool. Doing so forces
readers of the code to think what the bool means even though
understanding this bool is not needed since in is just passed back down
to the FFI code. We can abstract this away by using an opaque type to
hold the original int and not converting it to a boolean value.
Add 'Return' and 'Error' sections to `tweak_add_assign` while fixing the
docs to describe the new opaque parity type.1 parent 1b768b2 commit fbc64c7
1 file changed
+27
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
827 | | - | |
| 827 | + | |
| 828 | + | |
828 | 829 | | |
829 | | - | |
830 | | - | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
831 | 834 | | |
832 | 835 | | |
833 | 836 | | |
834 | 837 | | |
835 | | - | |
| 838 | + | |
836 | 839 | | |
837 | 840 | | |
838 | 841 | | |
| |||
856 | 859 | | |
857 | 860 | | |
858 | 861 | | |
859 | | - | |
860 | 862 | | |
861 | | - | |
862 | | - | |
863 | | - | |
| 863 | + | |
864 | 864 | | |
| 865 | + | |
| 866 | + | |
865 | 867 | | |
866 | 868 | | |
867 | 869 | | |
| |||
878 | 880 | | |
879 | 881 | | |
880 | 882 | | |
881 | | - | |
| 883 | + | |
882 | 884 | | |
883 | 885 | | |
884 | 886 | | |
885 | 887 | | |
886 | 888 | | |
887 | 889 | | |
888 | 890 | | |
889 | | - | |
| 891 | + | |
890 | 892 | | |
891 | 893 | | |
892 | 894 | | |
| |||
896 | 898 | | |
897 | 899 | | |
898 | 900 | | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
899 | 916 | | |
900 | 917 | | |
901 | 918 | | |
| |||
0 commit comments