summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp.h
diff options
context:
space:
mode:
authorDavid Wragg <david@rabbitmq.com>2010-10-21 17:49:04 +0100
committerDavid Wragg <david@rabbitmq.com>2010-10-21 17:49:04 +0100
commit51345a3ded6ecd073921b7e83ec06bbd8988c345 (patch)
treeaac2e1213ecf426d5e68e24ea08fcce8d7602289 /librabbitmq/amqp.h
parentba49cb334a0a9ff96956c22ea6eab8920123c6a2 (diff)
downloadrabbitmq-c-github-ask-51345a3ded6ecd073921b7e83ec06bbd8988c345.tar.gz
Eliminate the AMQP_EMPTY_* macros from amqp.h
Hooray, amqp.h is now ISO C90 clean.
Diffstat (limited to 'librabbitmq/amqp.h')
-rw-r--r--librabbitmq/amqp.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h
index 308119d..a0f8331 100644
--- a/librabbitmq/amqp.h
+++ b/librabbitmq/amqp.h
@@ -75,8 +75,6 @@ typedef struct amqp_bytes_t_ {
void *bytes;
} amqp_bytes_t;
-#define AMQP_EMPTY_BYTES ((amqp_bytes_t) { .len = 0, .bytes = NULL })
-
typedef struct amqp_decimal_t_ {
uint8_t decimals;
uint32_t value;
@@ -87,15 +85,11 @@ typedef struct amqp_table_t_ {
struct amqp_table_entry_t_ *entries;
} amqp_table_t;
-#define AMQP_EMPTY_TABLE ((amqp_table_t) { .num_entries = 0, .entries = NULL })
-
typedef struct amqp_array_t_ {
int num_entries;
struct amqp_field_value_t_ *entries;
} amqp_array_t;
-#define AMQP_EMPTY_ARRAY ((amqp_array_t) { .num_entries = 0, .entries = NULL })
-
/*
0-9 0-9-1 Qpid/Rabbit Type Remarks
---------------------------------------------------------------------------
@@ -246,6 +240,11 @@ typedef struct amqp_connection_state_t_ *amqp_connection_state_t;
RABBITMQ_EXPORT char const *amqp_version(void);
+/* Exported empty data structures */
+RABBITMQ_EXPORT const amqp_bytes_t amqp_empty_bytes;
+RABBITMQ_EXPORT const amqp_table_t amqp_empty_table;
+RABBITMQ_EXPORT const amqp_array_t amqp_empty_array;
+
RABBITMQ_EXPORT void init_amqp_pool(amqp_pool_t *pool, size_t pagesize);
RABBITMQ_EXPORT void recycle_amqp_pool(amqp_pool_t *pool);
RABBITMQ_EXPORT void empty_amqp_pool(amqp_pool_t *pool);