summaryrefslogtreecommitdiff
path: root/lib/gnutls_str.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-03-20 08:35:48 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-03-20 09:16:39 +0100
commitd5970922fdd31568bb3b696c6328832b12a28209 (patch)
tree465eacb1fac2a9e57095aaaad08bf8d26d640ddd /lib/gnutls_str.h
parenta9884810ec9e99fb8e1849f123257724d34d75e6 (diff)
downloadgnutls-d5970922fdd31568bb3b696c6328832b12a28209.tar.gz
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.
Diffstat (limited to 'lib/gnutls_str.h')
-rw-r--r--lib/gnutls_str.h11
1 files changed, 11 insertions, 0 deletions
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 <gnutls_int.h>
#include <gnutls_datum.h>
+
#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