diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-07-06 13:34:20 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-07-06 13:34:20 -0700 |
| commit | 82c70435ec9be9c607de4fbd62d4de9ae7d7c081 (patch) | |
| tree | 86b3edea0a1358395f417c689b7cb666fb77c890 /src/core/defs.h | |
| parent | 8811317e2da3b5a21d6caab0cc0e12aad417edd6 (diff) | |
| download | nng-82c70435ec9be9c607de4fbd62d4de9ae7d7c081.tar.gz nng-82c70435ec9be9c607de4fbd62d4de9ae7d7c081.tar.bz2 nng-82c70435ec9be9c607de4fbd62d4de9ae7d7c081.zip | |
Initial swag at asynchronous name resolution.
Diffstat (limited to 'src/core/defs.h')
| -rw-r--r-- | src/core/defs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/defs.h b/src/core/defs.h index 1c44e9af..5db68c1c 100644 --- a/src/core/defs.h +++ b/src/core/defs.h @@ -72,8 +72,10 @@ typedef struct { #define NNI_SECOND (1000000) // Structure allocation conveniences. -#define NNI_ALLOC_STRUCT(s) nni_alloc(sizeof (*s)) -#define NNI_FREE_STRUCT(s) nni_free((s), sizeof (*s)) +#define NNI_ALLOC_STRUCT(s) nni_alloc(sizeof (*s)) +#define NNI_FREE_STRUCT(s) nni_free((s), sizeof (*s)) +#define NNI_ALLOC_STRUCTS(s, n) nni_alloc(sizeof (*s) * n) +#define NNI_FREE_STRUCTS(s, n) nni_free(s, sizeof (*s) * n) #define NNI_PUT16(ptr, u) \ do { \ |
