Commit 6b02ec70 authored by Sam Hocevar's avatar Sam Hocevar

* ./src/misc/variables.c: simple change to var_Type() so that it returns

    an error (value < 0) if the variable does not exist.
parent 319e629d
......@@ -2,7 +2,7 @@
* variables.c: routines for object variables handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: variables.c,v 1.11 2002/10/29 13:22:48 sam Exp $
* $Id: variables.c,v 1.12 2002/10/29 13:38:37 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -420,9 +420,10 @@ int __var_Change( vlc_object_t *p_this, const char *psz_name,
}
/*****************************************************************************
* var_Type: request a variable's type, 0 if not found
* var_Type: request a variable's type
*****************************************************************************
*
* This function returns the variable type if it exists, or an error if the
* variable could not be found.
*****************************************************************************/
int __var_Type( vlc_object_t *p_this, const char *psz_name )
{
......@@ -435,7 +436,7 @@ int __var_Type( vlc_object_t *p_this, const char *psz_name )
if( i_var < 0 )
{
vlc_mutex_unlock( &p_this->var_lock );
return 0;
return i_var;
}
i_type = p_this->p_vars[i_var].i_type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment