Changeset 13655


Ignore:
Timestamp:
Dec 13, 2012, 2:00:45 AM (9 years ago)
Author:
jordan
Message:

don't inline functions that can't be inlined.

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bitfield.c

    r13637 r13655  
    131131}
    132132
     133bool
     134tr_bitfieldHas (const tr_bitfield * b, size_t n)
     135{
     136  if (tr_bitfieldHasAll (b))
     137    return true;
     138
     139  if (tr_bitfieldHasNone (b))
     140    return false;
     141
     142  if (n>>3u >= b->alloc_count)
     143    return false;
     144
     145  return (b->bits[n>>3u] << (n & 7u) & 0x80) != 0;
     146}
     147
    133148/***
    134149****
  • trunk/libtransmission/bitfield.h

    r13625 r13655  
    9999}
    100100
    101 static inline bool
    102 tr_bitfieldHas (const tr_bitfield * b, size_t n)
    103 {
    104   if (tr_bitfieldHasAll (b))
    105     return true;
    106 
    107   if (tr_bitfieldHasNone (b))
    108     return false;
    109 
    110   if (n>>3u >= b->alloc_count)
    111     return false;
    112 
    113   return (b->bits[n>>3u] << (n & 7u) & 0x80) != 0;
    114 }
     101bool tr_bitfieldHas (const tr_bitfield * b, size_t n);
    115102
    116103#endif
  • trunk/libtransmission/libtransmission-test.h

    r13642 r13655  
    1313    fprintf (stderr, "%s %s:%d\n", result, __FILE__, __LINE__)
    1414
    15 static inline bool
     15static bool
    1616should_print (bool pass)
    1717{
     
    2626}
    2727
    28 static inline bool
     28static bool
    2929check_condition_impl (const char * file, int line, bool condition)
    3030{
     
    3737}
    3838
    39 static inline bool
     39static bool
    4040check_streq_impl (const char * file, int line, const char * expected, const char * actual)
    4141{
     
    5252}
    5353
    54 static inline bool
     54static bool
    5555check_int_eq_impl (const char * file, int line, int64_t expected, int64_t actual)
    5656{
     
    6767}
    6868
    69 static inline bool
     69static bool
    7070check_ptr_eq_impl (const char * file, int line, const void * expected, const void * actual)
    7171{
     
    121121#define NUM_TESTS(tarray)((int)(sizeof (tarray)/sizeof (tarray[0])))
    122122
    123 static inline int
     123static int
    124124runTests (const testFunc * const tests, int numTests)
    125125{
Note: See TracChangeset for help on using the changeset viewer.