diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-24 13:12:56 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-24 13:12:56 -0800 |
| commit | 2afc725ff5a41fbc7445f3681e83cf579f13b578 (patch) | |
| tree | aafc445c2857c83edaae6378094ec5f217a9cbad /docs | |
| parent | 5ab47e210de76d29cffbc9ea47800775a3627210 (diff) | |
| download | nng-2afc725ff5a41fbc7445f3681e83cf579f13b578.tar.gz nng-2afc725ff5a41fbc7445f3681e83cf579f13b578.tar.bz2 nng-2afc725ff5a41fbc7445f3681e83cf579f13b578.zip | |
Remove all the set_ptr option functions.
This hopefully ensures that we have good typed functions instead
of just passing around pointers blithely.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/man/nng_dialer_set.3.adoc | 12 | ||||
| -rw-r--r-- | docs/man/nng_listener_set.3.adoc | 12 | ||||
| -rw-r--r-- | docs/man/nng_stream_dialer_set.3str.adoc | 13 | ||||
| -rw-r--r-- | docs/man/nng_stream_listener_set.3str.adoc | 13 | ||||
| -rw-r--r-- | docs/ref/migrate/nng1.md | 5 |
5 files changed, 5 insertions, 50 deletions
diff --git a/docs/man/nng_dialer_set.3.adoc b/docs/man/nng_dialer_set.3.adoc index 82673959..efad700c 100644 --- a/docs/man/nng_dialer_set.3.adoc +++ b/docs/man/nng_dialer_set.3.adoc @@ -25,8 +25,6 @@ int nng_dialer_set_int(nng_dialer d, const char *opt, int ival); int nng_dialer_set_ms(nng_dialer d, const char *opt, nng_duration dur); -int nng_dialer_set_ptr(nng_dialer d, const char *opt, void *ptr); - int nng_dialer_set_size(nng_dialer d, const char *opt, size_t z); int nng_dialer_set_string(nng_dialer d, const char *opt, const char *str); @@ -67,16 +65,6 @@ This function is used to configure time durations (such as timeouts) using type xref:nng_duration.5.adoc[`nng_duration`]. The duration _dur_ is an integer number of milliseconds. -`nng_dialer_set_ptr()`:: -This function is used to pass a pointer, _ptr_, to structured data. -The data referenced by _ptr_ is generally managed by other functions. -For example, TLS configuration objects created with -(xref:nng_tls_config_alloc.3tls.adoc[`nng_tls_config_alloc()`]) -can be passed this way. - -NOTE: This form is somewhat special in that the object is generally -not copied, but instead the *pointer* to the object is copied. - `nng_dialer_set_size()`:: This function is used to configure a size, _z_, typically for buffer sizes, message maximum sizes, and similar options. diff --git a/docs/man/nng_listener_set.3.adoc b/docs/man/nng_listener_set.3.adoc index 37c9b48e..f245fe60 100644 --- a/docs/man/nng_listener_set.3.adoc +++ b/docs/man/nng_listener_set.3.adoc @@ -25,8 +25,6 @@ int nng_listener_set_int(nng_listener l, const char *opt, int ival); int nng_listener_set_ms(nng_listener l, const char *opt, nng_duration dur); -int nng_listener_set_ptr(nng_listener l, const char *opt, void *ptr); - int nng_listener_set_size(nng_listener l, const char *opt, size_t z); int nng_listener_set_string(nng_listener l, const char *opt, const char *str); @@ -68,16 +66,6 @@ This function is used to configure time durations (such as timeouts) using type xref:nng_duration.5.adoc[`nng_duration`]. The duration _dur_ is an integer number of milliseconds. -`nng_listener_set_ptr()`:: -This function is used to pass a pointer, _ptr_, to structured data. -The data referenced by _ptr_ is generally managed by other functions. -For example, TLS configuration objects created with -(xref:nng_tls_config_alloc.3tls.adoc[`nng_tls_config_alloc()`]) -can be passed this way. - -NOTE: This form is somewhat special in that the object is generally -not copied, but instead the *pointer* to the object is copied. - `nng_listener_set_size()`:: This function is used to configure a size, _z_, typically for buffer sizes, message maximum sizes, and similar options. diff --git a/docs/man/nng_stream_dialer_set.3str.adoc b/docs/man/nng_stream_dialer_set.3str.adoc index 6a610500..2c75c9d9 100644 --- a/docs/man/nng_stream_dialer_set.3str.adoc +++ b/docs/man/nng_stream_dialer_set.3str.adoc @@ -26,8 +26,6 @@ int nng_stream_dialer_set_int(nng_stream_dialer *d, const char *opt, int val); int nng_stream_dialer_set_ms(nng_stream_dialer *d, const char *opt, nng_duration val); -int nng_stream_dialer_set_ptr(nng_stream_dialer *d, const char *opt, void *val); - int nng_stream_dialer_set_size(nng_stream_dialer *d, const char *opt, size_t val); int nng_stream_dialer_set_string(nng_stream_dialer *d, const char *opt, const char *val); @@ -67,17 +65,6 @@ the type xref:nng_duration.5.adoc[`nng_duration`]. The duration is an integer number of milliseconds. -`nng_stream_dialer_set_ptr()`:: -This function is used to pass a pointer to structured data. -The data referenced by is generally managed by other functions. -For example, TLS configuration objects created with -xref:nng_tls_config_alloc.3tls.adoc[`nng_tls_config_alloc()`] -can be passed this way. -+ -NOTE: This form is somewhat special in that the object is generally -not copied, but instead the *pointer* to the object is copied. -Please see the documentation for the specific option for further details. - `nng_stream_dialer_set_size()`:: This function is used to configure a size, typically for buffer sizes, message maximum sizes, and similar options. diff --git a/docs/man/nng_stream_listener_set.3str.adoc b/docs/man/nng_stream_listener_set.3str.adoc index 08a852bf..a623eef3 100644 --- a/docs/man/nng_stream_listener_set.3str.adoc +++ b/docs/man/nng_stream_listener_set.3str.adoc @@ -26,8 +26,6 @@ int nng_stream_listener_set_int(nng_stream_listener *l, const char *opt, int val int nng_stream_listener_set_ms(nng_stream_listener *l, const char *opt, nng_duration val); -int nng_stream_listener_set_ptr(nng_stream_listener *l, const char *opt, void *val); - int nng_stream_listener_set_size(nng_stream_listener *l, const char *opt, size_t val); int nng_stream_listener_set_string(nng_stream_listener *l, const char *opt, const char *val); @@ -67,17 +65,6 @@ the type xref:nng_duration.5.adoc[`nng_duration`]. The duration is an integer number of milliseconds. -`nng_stream_listener_set_ptr()`:: -This function is used to pass a pointer to structured data. -The data referenced by is generally managed by other functions. -For example, TLS configuration objects created with -xref:nng_tls_config_alloc.3tls.adoc[`nng_tls_config_alloc()`] -can be passed this way. -+ -NOTE: This form is somewhat special in that the object is generally -not copied, but instead the *pointer* to the object is copied. -Please see the documentation for the specific option for further details. - `nng_stream_listener_set_size()`:: This function is used to configure a size, typically for buffer sizes, message maximum sizes, and similar options. diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md index 152c464b..54e89e8e 100644 --- a/docs/ref/migrate/nng1.md +++ b/docs/ref/migrate/nng1.md @@ -92,10 +92,15 @@ and are thus removed: - `nng_ctx_get_string` - `nng_ctx_set_string` +- `nng_dialer_set_ptr` +- `nng_listener_set_ptr` - `nng_socket_get_ptr` - `nng_socket_set_ptr` - `nng_socket_get_string` - `nng_socket_set_string` +- `nng_stream_set_ptr` +- `nng_stream_dialer_set_ptr` +- `nng_stream_listener_set_ptr` - `nng_ctx_get_ptr` (not documented) - `nng_ctx_set_ptr` (not documented) |
