diff options
Diffstat (limited to 'librabbitmq/amqp.h')
-rw-r--r-- | librabbitmq/amqp.h | 17 |
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 |