* Added 'method.rlookup' and 'method.rlookup.clear' commands for looking up the event handlers holding a specified key.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1231 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2011-05-26 03:38:45 +00:00
parent 5200454cf7
commit d2f328cc8e
7 changed files with 125 additions and 21 deletions
+6
View File
@@ -452,6 +452,9 @@ print_object(char* first, char* last, const torrent::Object* src, int flags) {
return std::min(first + snprintf(first, std::distance(first, last), "%lli", src->as_value()), last);
case torrent::Object::TYPE_LIST:
if (first != last)
*first = '\0';
for (torrent::Object::list_const_iterator itr = src->as_list().begin(), itrEnd = src->as_list().end(); itr != itrEnd; itr++) {
first = print_object(first, last, &*itr, flags);
@@ -462,6 +465,9 @@ print_object(char* first, char* last, const torrent::Object* src, int flags) {
return first;
case torrent::Object::TYPE_NONE:
if (first != last)
*first = '\0';
return first;
default:
throw torrent::input_error("Invalid type.");