summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp.h
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2013-06-14 11:17:18 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2013-06-14 11:17:18 -0700
commit996a47470aa972410a15989ca8ecb3901056396f (patch)
tree7ebc24ce34bf2fcc80cacaa4aa50a390b75d4ef5 /librabbitmq/amqp.h
parent4d9f3abcc30bc628dd872d83233de8744136547d (diff)
downloadrabbitmq-c-github-ask-996a47470aa972410a15989ca8ecb3901056396f.tar.gz
Preserve API/ABI of amqp_error_string()
Preserve API/ABI of amqp_error_string() by having it return a string allocated on the heap. Deprecate this function in favor of amqp_error_string2() which returns a statically allocated string
Diffstat (limited to 'librabbitmq/amqp.h')
-rw-r--r--librabbitmq/amqp.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h
index 2a0bf19..2020549 100644
--- a/librabbitmq/amqp.h
+++ b/librabbitmq/amqp.h
@@ -588,11 +588,24 @@ AMQP_CALL amqp_data_in_buffer(amqp_connection_state_t state);
/*
* Get the error string for the given error code.
*
- * Error string is statically allocated. (API changed in v0.4.0)
+ * @deprecated This function has been deprecated in favor of
+ * \ref amqp_error_string2() which returns statically allocated
+ * string which do not need to be freed by the caller.
+ *
+ * The returned string resides on the heap; the caller is responsible
+ * for freeing it
+ *
*/
+AMQP_DEPRECATED(
+ AMQP_PUBLIC_FUNCTION
+ char *
+ AMQP_CALL amqp_error_string(int err)
+);
+
AMQP_PUBLIC_FUNCTION
const char *
-AMQP_CALL amqp_error_string(int err);
+AMQP_CALL amqp_error_string2(int err);
+
AMQP_PUBLIC_FUNCTION
int