From 693773195dcd877164314d6b4c37cbd980cbb6ab Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 20 Oct 2024 17:01:10 -0700 Subject: Use `const` for nng_stat when possible. This should help the compiler enforce checks, and may result in better optimizations. --- docs/migrating/nng1.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/migrating') diff --git a/docs/migrating/nng1.md b/docs/migrating/nng1.md index b0afb888..9da86d48 100644 --- a/docs/migrating/nng1.md +++ b/docs/migrating/nng1.md @@ -48,3 +48,9 @@ options must be set on the endpoint (dialer or listener) using the appropriate `nng_dialer_set` or `nng_listener_set` option. This likely means that it is necessary to allocate and configure the endpoint before attaching it to the socket. This will also afford a much more fine-grained level of control over transport options. + +## Statistics Use Constified Pointers + +A number of the statistics functions take, or return, `const nng_stat *` instead +of plain `nng_stat *`. The ABI has not changed, but it may be necessary to declare +certain methods variables `const` to avoid warnings about misuse of `const`. -- cgit v1.2.3-70-g09d2