add a backwards compatible lazy_bdecode()
This commit is contained in:
parent
e5f980d80d
commit
f82321c1dd
|
@ -58,6 +58,14 @@ namespace libtorrent
|
|||
, lazy_entry& ret, error_code& ec, int* error_pos = 0
|
||||
, int depth_limit = 1000, int item_limit = 1000000);
|
||||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
// for backwards compatibility, does not report error code
|
||||
// deprecated in 0.16
|
||||
TORRENT_DEPRECATED_PREFIX
|
||||
TORRENT_EXPORT int lazy_bdecode(char const* start, char const* end
|
||||
, lazy_entry& ret, int depth_limit = 1000, int item_limit = 1000000) TORRENT_DEPRECATED;
|
||||
#endif
|
||||
|
||||
struct pascal_string
|
||||
{
|
||||
pascal_string(char const* p, int l): len(l), ptr(p) {}
|
||||
|
|
|
@ -77,6 +77,16 @@ namespace libtorrent
|
|||
return start;
|
||||
}
|
||||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
int lazy_bdecode(char const* start, char const* end
|
||||
, lazy_entry& ret, int depth_limit, int item_limit)
|
||||
{
|
||||
error_code ec;
|
||||
int pos;
|
||||
return lazy_bdecode(start, end, ret, ec, &pos, depth_limit, item_limit);
|
||||
}
|
||||
#endif
|
||||
|
||||
// return 0 = success
|
||||
int lazy_bdecode(char const* start, char const* end, lazy_entry& ret
|
||||
, error_code& ec, int* error_pos, int depth_limit, int item_limit)
|
||||
|
|
Loading…
Reference in New Issue