aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2021-12-25 12:09:26 -0800
committerGarrett D'Amore <garrett@damore.org>2021-12-25 12:09:26 -0800
commit2049626be08cd584c3314df7a9ab49c114ba5254 (patch)
tree2676e176bcbe1aed5df30bdca73a75833454ddc9
parent024df6d86c7b0427d1c0a290c904696398499484 (diff)
downloadnng-2049626be08cd584c3314df7a9ab49c114ba5254.tar.gz
nng-2049626be08cd584c3314df7a9ab49c114ba5254.tar.bz2
nng-2049626be08cd584c3314df7a9ab49c114ba5254.zip
Restore legacy nng_getopt_ptr.
closes #1553
-rw-r--r--include/nng/nng.h4
-rw-r--r--src/nng_legacy.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h
index a7c184ba..d40f5135 100644
--- a/include/nng/nng.h
+++ b/include/nng/nng.h
@@ -51,7 +51,7 @@ extern "C" {
#define NNG_MAJOR_VERSION 1
#define NNG_MINOR_VERSION 6
#define NNG_PATCH_VERSION 0
-#define NNG_RELEASE_SUFFIX "" // if non-empty, this is a pre-release
+#define NNG_RELEASE_SUFFIX "pre" // if non-empty, this is a pre-release
// Maximum length of a socket address. This includes the terminating NUL.
// This limit is built into other implementations, so do not change it.
@@ -1198,7 +1198,7 @@ NNG_DECL int nng_stream_listener_set_addr(
// always returns NNG_ENOTSUP.
NNG_DECL int nng_msg_getopt(nng_msg *, int, void *, size_t *);
-// Socket options. Use nng_socket_get and nng_socket_set isnetadl
+// Socket options. Use nng_socket_get and nng_socket_set instead.
NNG_DECL int nng_getopt(nng_socket, const char *, void *, size_t *);
NNG_DECL int nng_getopt_bool(nng_socket, const char *, bool *);
NNG_DECL int nng_getopt_int(nng_socket, const char *, int *);
diff --git a/src/nng_legacy.c b/src/nng_legacy.c
index c38d0a23..a041cc06 100644
--- a/src/nng_legacy.c
+++ b/src/nng_legacy.c
@@ -63,6 +63,11 @@ nng_getopt_ms(nng_socket id, const char *n, nng_duration *v)
return (nng_socket_get_ms(id, n, v));
}
+int nng_getopt_ptr(nng_socket id, const char *n, void **v)
+{
+ return (nng_socket_get_ptr(id, n, v));
+}
+
int
nng_getopt_string(nng_socket id, const char *n, char **v)
{