add inline wrapper functions to tr_torrent to decouple the rest of the code from tr_completion

This commit is contained in:
Jordan Lee
2013-08-18 13:06:39 +00:00
parent 4a904044e4
commit 35638e210e
9 changed files with 120 additions and 60 deletions

View File

@@ -746,7 +746,7 @@ addField (tr_torrent * const tor,
if (tr_torrentHasMetadata (tor))
{
size_t byte_count = 0;
void * bytes = tr_cpCreatePieceBitfield (&tor->completion, &byte_count);
void * bytes = tr_torrentCreatePieceBitfield (tor, &byte_count);
char * str = tr_base64_encode (bytes, byte_count, NULL);
tr_variantDictAddStr (d, key, str!=NULL ? str : "");
tr_free (str);