Ignore:
Timestamp:
Sep 4, 2008, 2:42:32 PM (14 years ago)
Author:
charles
Message:

(libT) change benc's integral type from int to size_t, squashing a couple of minor warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode.h

    r6615 r6699  
    3232        struct
    3333        {
    34             int    i;
     34            size_t i;
    3535            char * s;
    3636        } s;
    3737        struct
    3838        {
    39             int alloc;
    40             int count;
     39            size_t alloc;
     40            size_t count;
    4141            struct tr_benc * vals;
    4242        } l;
     
    5454
    5555int tr_bencLoad( const void  * buf,
    56                  int           buflen,
     56                 size_t        buflen,
    5757                 tr_benc     * setme_benc,
    5858                 char       ** setme_end );
     
    7575void  tr_bencInitRaw( tr_benc *, const void * raw, size_t raw_len );
    7676void  tr_bencInitInt( tr_benc *, int64_t num );
    77 int   tr_bencInitDict( tr_benc *, int reserveCount );
    78 int   tr_bencInitList( tr_benc *, int reserveCount );
     77int   tr_bencInitDict( tr_benc *, size_t reserveCount );
     78int   tr_bencInitList( tr_benc *, size_t reserveCount );
    7979
    8080/***
     
    8282***/
    8383
    84 int tr_bencListReserve( tr_benc *, int count );
     84int tr_bencListReserve( tr_benc *, size_t reserveCount );
    8585tr_benc * tr_bencListAdd( tr_benc * );
    8686tr_benc * tr_bencListAddInt( tr_benc *, int64_t val );
    8787tr_benc * tr_bencListAddStr( tr_benc *, const char * val );
    88 tr_benc * tr_bencListAddList( tr_benc *, int reserveCount );
    89 tr_benc * tr_bencListAddDict( tr_benc *, int reserveCount );
     88tr_benc * tr_bencListAddList( tr_benc *, size_t reserveCount );
     89tr_benc * tr_bencListAddDict( tr_benc *, size_t reserveCount );
    9090
    91 int tr_bencListSize( const tr_benc * list );
    92 tr_benc * tr_bencListChild( tr_benc * list, int n );
     91size_t tr_bencListSize( const tr_benc * list );
     92tr_benc * tr_bencListChild( tr_benc * list, size_t n );
    9393
    9494/***
     
    9696***/
    9797
    98 int tr_bencDictReserve( tr_benc *, int count );
     98int tr_bencDictReserve( tr_benc *, size_t reserveCount );
    9999int tr_bencDictRemove( tr_benc *, const char * key );
    100100tr_benc * tr_bencDictAdd( tr_benc *, const char * key );
     
    102102tr_benc * tr_bencDictAddInt( tr_benc *, const char * key, int64_t val );
    103103tr_benc * tr_bencDictAddStr( tr_benc *, const char * key, const char * val );
    104 tr_benc * tr_bencDictAddList( tr_benc *, const char * key, int reserveCount );
    105 tr_benc * tr_bencDictAddDict( tr_benc *, const char * key, int reserveCount );
     104tr_benc * tr_bencDictAddList( tr_benc *, const char * key, size_t reserve );
     105tr_benc * tr_bencDictAddDict( tr_benc *, const char * key, size_t reserve );
    106106tr_benc * tr_bencDictAddRaw( tr_benc *, const char * key,
    107107                             const void *, size_t len );
Note: See TracChangeset for help on using the changeset viewer.