From d5970922fdd31568bb3b696c6328832b12a28209 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Fri, 20 Mar 2015 08:35:48 +0100 Subject: added gnutls_ext_set_data() and gnutls_ext_get_data() As a side effect the type which holds private data was reduced from union to void * pointer. That simplifies the exported API without reducing the options in the internal API. --- lib/gnutls_str.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/gnutls_str.h') diff --git a/lib/gnutls_str.h b/lib/gnutls_str.h index ddbd2c77ec..c08b308ba2 100644 --- a/lib/gnutls_str.h +++ b/lib/gnutls_str.h @@ -25,6 +25,7 @@ #include #include + #include "gettext.h" #define _(String) dgettext (PACKAGE, String) @@ -200,4 +201,14 @@ int _gnutls_hostname_compare(const char *certname, size_t certnamesize, o = s; \ } +#define BUFFER_POP_CAST_NUM(b, o) { \ + size_t s; \ + ret = _gnutls_buffer_pop_prefix(b, &s, 0); \ + if (ret < 0) { \ + gnutls_assert(); \ + goto error; \ + } \ + o = (void *) (intptr_t)(s); \ + } + #endif -- cgit v1.2.1