mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-16 07:02:30 +00:00
* 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user