* Continuing conversion to the new command infrastructure.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@896 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-04-29 18:46:55 +00:00
parent 43fd2c92ec
commit 2ede6f03ab
9 changed files with 130 additions and 47 deletions
+7 -2
View File
@@ -46,8 +46,10 @@ namespace utils {
// By using a static array we avoid allocating the variables on the
// heap. This should reduce memory use and improve cache locality.
#define COMMAND_SLOTS_SIZE 24
#define COMMAND_VARIABLES_SIZE 24
#define COMMAND_SLOTS_SIZE 50
#define COMMAND_VARIABLES_SIZE 50
#define ADDING_COMMANDS
extern utils::CommandSlot commandSlots[COMMAND_SLOTS_SIZE];
extern utils::CommandSlot* commandSlotsItr;
@@ -80,4 +82,7 @@ add_variable("get_" key, "set_" key, key, &utils::CommandVariable::get_string, &
commandSlotsItr->set_slot(slot); \
variables->insert(key, commandSlotsItr++, &utils::CommandSlot::function, utils::VariableMap::flag_dont_delete);
#define ADD_COMMAND_COPY(key, function) \
variables->insert(key, (commandSlotsItr - 1), &utils::CommandSlot::function, utils::VariableMap::flag_dont_delete);
#endif