vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Mon Mar 4 20:40:59 2019 +0200| [3e8986472aef53f5e982a8c751a6a3a1568b582a] | committer: Rémi Denis-Courmont
Rename vlc_error() to vlc_error_string() As a sort of VLC equivalent for strerror(), it is tempting to call it vlc_strerror()... but that is already taken for converting actual standard error codes to strings. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3e8986472aef53f5e982a8c751a6a3a1568b582a --- include/vlc_common.h | 2 +- modules/control/oldrc.c | 4 ++-- modules/lua/libs/misc.c | 2 +- src/libvlccore.sym | 2 +- src/misc/error.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/vlc_common.h b/include/vlc_common.h index 55866a9067..033c618677 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -945,7 +945,7 @@ static inline bool mul_overflow(unsigned long long a, unsigned long long b, #define EMPTY_STR(str) (!str || !*str) -VLC_API char const * vlc_error( int ) VLC_USED; +VLC_API const char *vlc_error_string(int) VLC_USED; #include <vlc_arrays.h> diff --git a/modules/control/oldrc.c b/modules/control/oldrc.c index 062ce72179..c5349934c5 100644 --- a/modules/control/oldrc.c +++ b/modules/control/oldrc.c @@ -645,7 +645,7 @@ static void *Run( void *data ) else i_ret = var_SetString( p_intf, psz_cmd, psz_arg ); msg_rc( "%s: returned %i (%s)", - psz_cmd, i_ret, vlc_error( i_ret ) ); + psz_cmd, i_ret, vlc_error_string( i_ret ) ); } /* Or maybe it's a global command */ else if( var_Type( vlc, psz_cmd ) & VLC_VAR_ISCOMMAND ) @@ -661,7 +661,7 @@ static void *Run( void *data ) if( i_ret != 0 ) { msg_rc( "%s: returned %i (%s)", - psz_cmd, i_ret, vlc_error( i_ret ) ); + psz_cmd, i_ret, vlc_error_string( i_ret ) ); } } else if( !strcmp( psz_cmd, "logout" ) ) diff --git a/modules/lua/libs/misc.c b/modules/lua/libs/misc.c index f07e93b15c..b251eb7f22 100644 --- a/modules/lua/libs/misc.c +++ b/modules/lua/libs/misc.c @@ -84,7 +84,7 @@ vlc_object_t * vlclua_get_this( lua_State *L ) int vlclua_push_ret( lua_State *L, int i_error ) { lua_pushnumber( L, i_error ); - lua_pushstring( L, vlc_error( i_error ) ); + lua_pushstring( L, vlc_error_string( i_error ) ); return 2; } diff --git a/src/libvlccore.sym b/src/libvlccore.sym index d64cadd249..209b4b2933 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -573,7 +573,7 @@ vlc_sem_wait vlc_control_cancel vlc_GetCPUCount vlc_CPU -vlc_error +vlc_error_string vlc_event_attach vlc_event_detach vlc_filenamecmp diff --git a/src/misc/error.c b/src/misc/error.c index 4b4646c342..80c1f9b08d 100644 --- a/src/misc/error.c +++ b/src/misc/error.c @@ -30,12 +30,12 @@ #include <vlc_common.h> /***************************************************************************** - * vlc_error: strerror() equivalent + * vlc_error_string: strerror() equivalent ***************************************************************************** * This function returns a string describing the error code passed in the * argument. A list of all errors can be found in include/vlc_common.h. *****************************************************************************/ -char const * vlc_error ( int i_err ) +const char *vlc_error_string(int i_err) { switch( i_err ) { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
