-
Hi! I'm writing bindings to the Key Exchange API, and I'm reading the signature of int crypto_kx_client_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES],
unsigned char tx[crypto_kx_SESSIONKEYBYTES],
const unsigned char client_pk[crypto_kx_PUBLICKEYBYTES],
const unsigned char client_sk[crypto_kx_SECRETKEYBYTES],
const unsigned char server_pk[crypto_kx_PUBLICKEYBYTES]); Now from what I know of the Standard, the array syntax means that these parameters are non-nullable pointers. Then a little bit down the documentation paragraph, I see this sentence:
My questions is: Aren't |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
So, I was sorely mistaken, it's actually when the keyword |
Beta Was this translation helpful? Give feedback.
-
Yes, as documented, these parameters can be Functions with parameters that have to be non- |
Beta Was this translation helpful? Give feedback.
So, I was sorely mistaken, it's actually when the keyword
static
appears in the[
]
that the pointer must be non-NULL.cf: https://godbolt.org/z/zffd1f7Yn