From 2df4d2e814f34d8e1cc0816885543dbb568812cc Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 24 Nov 2024 15:00:39 -0800 Subject: Remove all the get_ptr option accessors. Temporarily we have removed access to the peer alt names, but that was never used and was not tested (it also didn't work with WolfSSL.) --- src/core/defs.h | 3 --- src/core/options.c | 24 ------------------------ src/core/stream.c | 18 ------------------ 3 files changed, 45 deletions(-) (limited to 'src/core') diff --git a/src/core/defs.h b/src/core/defs.h index 46a32ef5..979c0300 100644 --- a/src/core/defs.h +++ b/src/core/defs.h @@ -189,14 +189,11 @@ typedef enum { NNI_TYPE_NONE, // DO NOT USE NNI_TYPE_BOOL, NNI_TYPE_INT32, - NNI_TYPE_UINT32, - NNI_TYPE_INT64, NNI_TYPE_UINT64, NNI_TYPE_SIZE, NNI_TYPE_DURATION, NNI_TYPE_STRING, NNI_TYPE_SOCKADDR, - NNI_TYPE_POINTER, } nni_type; typedef nni_type nni_opt_type; diff --git a/src/core/options.c b/src/core/options.c index fabd55fa..1540a807 100644 --- a/src/core/options.c +++ b/src/core/options.c @@ -88,19 +88,6 @@ nni_copyin_size( return (0); } -int -nni_copyin_ptr(void **pp, const void *v, size_t sz, nni_type t) -{ - NNI_ARG_UNUSED(sz); - - if (t != NNI_TYPE_POINTER) { - return (NNG_EBADTYPE); - } - - *pp = *(void **) v; - return (0); -} - int nni_copyin_str(char *s, const void *v, size_t maxsz, nni_type t) { @@ -173,17 +160,6 @@ nni_copyout_ms(nng_duration d, void *dst, size_t *szp, nni_type t) return (0); } -int -nni_copyout_ptr(void *p, void *dst, size_t *szp, nni_type t) -{ - NNI_ARG_UNUSED(szp); - if (t != NNI_TYPE_POINTER) { - return (NNG_EBADTYPE); - } - *(void **) dst = p; - return (0); -} - int nni_copyout_size(size_t s, void *dst, size_t *szp, nni_type t) { diff --git a/src/core/stream.c b/src/core/stream.c index cc7ac496..ad026586 100644 --- a/src/core/stream.c +++ b/src/core/stream.c @@ -346,12 +346,6 @@ nng_stream_get_string(nng_stream *s, const char *n, char **v) return (nni_stream_get(s, n, v, NULL, NNI_TYPE_STRING)); } -int -nng_stream_get_ptr(nng_stream *s, const char *n, void **v) -{ - return (nni_stream_get(s, n, v, NULL, NNI_TYPE_POINTER)); -} - int nng_stream_get_ms(nng_stream *s, const char *n, nng_duration *v) { @@ -394,12 +388,6 @@ nng_stream_dialer_get_string(nng_stream_dialer *d, const char *n, char **v) return (nni_stream_dialer_get(d, n, v, NULL, NNI_TYPE_STRING)); } -int -nng_stream_dialer_get_ptr(nng_stream_dialer *d, const char *n, void **v) -{ - return (nni_stream_dialer_get(d, n, v, NULL, NNI_TYPE_POINTER)); -} - int nng_stream_dialer_get_ms(nng_stream_dialer *d, const char *n, nng_duration *v) { @@ -450,12 +438,6 @@ nng_stream_listener_get_string(nng_stream_listener *l, const char *n, char **v) return (nni_stream_listener_get(l, n, v, NULL, NNI_TYPE_STRING)); } -int -nng_stream_listener_get_ptr(nng_stream_listener *l, const char *n, void **v) -{ - return (nni_stream_listener_get(l, n, v, NULL, NNI_TYPE_POINTER)); -} - int nng_stream_listener_get_ms( nng_stream_listener *l, const char *n, nng_duration *v) -- cgit v1.2.3-70-g09d2