Ignore:
Timestamp:
Feb 23, 2011, 3:54:04 AM (11 years ago)
Author:
jordan
Message:

(trunk libT) #4048 "use bitsets instead of bitfield in tr_completion" -- done.

Excuse the sprawl. Much of this didn't fit into self-contained commits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.c

    r11838 r12012  
    477477
    478478tr_bool
     479tr_bencGetRaw( const tr_benc * val, const uint8_t ** setme_raw, size_t * setme_len )
     480{
     481    const tr_bool success = tr_bencIsString( val );
     482
     483    if( success ) {
     484        *setme_raw = (uint8_t*) getStr(val);
     485        *setme_len = val->val.s.len;
     486    }
     487
     488    return success;
     489}
     490
     491tr_bool
    479492tr_bencGetBool( const tr_benc * val, tr_bool * setme )
    480493{
     
    564577
    565578tr_bool
    566 tr_bencDictFindRaw( tr_benc         * dict,
    567                     const char      * key,
    568                     const uint8_t  ** setme_raw,
    569                     size_t          * setme_len )
    570 {
    571     tr_benc * child;
    572     const tr_bool found = tr_bencDictFindType( dict, key, TR_TYPE_STR, &child );
    573 
    574     if( found ) {
    575         *setme_raw = (uint8_t*) getStr(child);
    576         *setme_len = child->val.s.len;
    577     }
    578 
    579     return found;
     579tr_bencDictFindRaw( tr_benc * dict, const char * key, const uint8_t  ** setme_raw, size_t * setme_len )
     580{
     581    return tr_bencGetRaw( tr_bencDictFind( dict, key ), setme_raw, setme_len );
    580582}
    581583
     
    17051707        else
    17061708        {
    1707             tr_fsync( fd );
     1709            //tr_fsync( fd );
    17081710            tr_close_file( fd );
    17091711
Note: See TracChangeset for help on using the changeset viewer.