Changeset 5540:2fd95aa93c27 in roaraudio


Ignore:
Timestamp:
06/12/12 15:45:13 (7 years ago)
Author:
phi
Branch:
default
Message:

moved roar_errno2() into roar_errno2_impl (macro) to make other functions faster by enabling thhem to access without calling roar_errno2().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/error.c

    r5459 r5540  
    188188} 
    189189 
     190#define roar_errno2_impl (&roar_errno) 
    190191int *  roar_errno2(void) { 
    191  return &roar_errno; 
     192 return roar_errno2_impl; 
    192193} 
    193194 
    194195void   roar_err_clear(void) { 
    195  *roar_errno2() = ROAR_ERROR_NONE; 
     196 *roar_errno2_impl = ROAR_ERROR_NONE; 
    196197} 
    197198 
     
    206207 
    207208void   roar_err_update(void) { 
    208  int * err = roar_errno2(); 
     209 int * err = roar_errno2_impl; 
    209210 
    210211 // NOTE: _NEVER_ call ROAR_{DBG,INFO,WARN,ERR}() in here! (will result in endless loop) 
     
    223224 
    224225void   roar_err_set(const int error) { 
    225  *roar_errno2() = error; 
     226 *roar_errno2_impl = error; 
    226227} 
    227228 
Note: See TracChangeset for help on using the changeset viewer.