aboutsummaryrefslogtreecommitdiff
path: root/src/core/defs.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-22 01:57:10 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-22 01:57:10 -0800
commit101c1b6a946d9f2f48c6dd89940ae669141e0511 (patch)
tree4da688859d87526d03d724ab1a729c6846650eae /src/core/defs.h
parentb92672e20420683e73bfc017956ac6ef2b6b793b (diff)
downloadnng-101c1b6a946d9f2f48c6dd89940ae669141e0511.tar.gz
nng-101c1b6a946d9f2f48c6dd89940ae669141e0511.tar.bz2
nng-101c1b6a946d9f2f48c6dd89940ae669141e0511.zip
Use C99 structure initializers FTW. Various other changes.
Diffstat (limited to 'src/core/defs.h')
-rw-r--r--src/core/defs.h43
1 files changed, 25 insertions, 18 deletions
diff --git a/src/core/defs.h b/src/core/defs.h
index b862f3ab..b294e0f3 100644
--- a/src/core/defs.h
+++ b/src/core/defs.h
@@ -1,28 +1,35 @@
-/*
- * Copyright 2016 Garrett D'Amore <garrett@damore.org>
- *
- * This software is supplied under the terms of the MIT License, a
- * copy of which should be located in the distribution where this
- * file was obtained (LICENSE.txt). A copy of the license may also be
- * found online at https://opensource.org/licenses/MIT.
- */
+//
+// Copyright 2016 Garrett D'Amore <garrett@damore.org>
+//
+// This software is supplied under the terms of the MIT License, a
+// copy of which should be located in the distribution where this
+// file was obtained (LICENSE.txt). A copy of the license may also be
+// found online at https://opensource.org/licenses/MIT.
+//
#ifndef CORE_DEFS_H
#define CORE_DEFS_H
-/*
- * C compilers may get unhappy when named arguments are not used. While
- * there are things like __attribute__((unused)) which are arguably
- * superior, support for such are not universal.
- */
+// C compilers may get unhappy when named arguments are not used. While
+// there are things like __attribute__((unused)) which are arguably
+// superior, support for such are not universal.
#define NNI_ARG_UNUSED(x) ((void) x);
-/*
- * These types are common but have names shared with user space.
- */
+// These types are common but have names shared with user space.
typedef struct nng_socket * nni_socket_t;
typedef struct nng_pipe * nni_pipe_t;
typedef struct nng_msg * nni_msg_t;
-typedef struct nng_endpt * nni_endpt_t;
-#endif /* CORE_DEFS_H */
+typedef struct nng_socket nni_socket;
+typedef struct nng_endpt nni_endpt;
+typedef struct nng_pipe nni_pipe;
+typedef struct nng_msg nni_msg;
+
+// These are our own names.
+typedef struct nni_transport nni_transport;
+typedef struct nni_endpt_ops nni_endpt_ops;
+typedef struct nni_pipe_ops nni_pipe_ops;
+
+typedef struct nni_protocol nni_protocol;
+
+#endif // CORE_DEFS_H