From 4e3dc7ce68561c16254712d713b2ccd472b8afe7 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 22 May 2006 15:20:46 +0000 Subject: Wrap strerror() in a function that makes it thread safe and converts the output to UTF-8. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@945 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/polyp/error.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/polyp/error.h') diff --git a/src/polyp/error.h b/src/polyp/error.h index 9856c1af..33507bfd 100644 --- a/src/polyp/error.h +++ b/src/polyp/error.h @@ -33,6 +33,12 @@ PA_C_DECL_BEGIN /** Return a human readable error message for the specified numeric error code */ const char* pa_strerror(int error); +/** A wrapper around the standard strerror() function that converts the + * string to UTF-8. The function is thread safe but the returned string is + * only guaranteed to exist until the thread exits or pa_cstrerror() is + * called again from the same thread. */ +char* pa_cstrerror(int errnum); + PA_C_DECL_END #endif -- cgit