cocaine/cocaine-core — pull request #149 by 3Hren (2014-12-23 14:45:53+00:00)
Title: [Detail] Mangle macro internal variables.

It is needed to avoid possible conflicts. For example, I've just fixed funny bug in Elliptics plugin, which compiled, but worked randomly.

```cpp
void log_adapter_impl_t::handle(const blackhole::record_t &record)
{
dnet_log_level level = record.extract(blackhole::keyword::severity().name());
auto cocaine_level = convert_verbosity(level);
COCAINE_LOG(m_log, cocaine_level, "%s", m_formatter.format(record));
}
```

After text substitution it resulted in the following code, where you can notice highly unexpected `m_formatter.format(record)` line, which uses just created `record` variable instead of provided one.

```cpp
void log_adapter_impl_t::handle(const blackhole::record_t &record)
{
dnet_log_level level = record.extract(blackhole::keyword::severity().name());
auto cocaine_level = convert_verbosity(level);
if(auto record = (m_log)->open_record(cocaine_level))
::blackhole::aux::logger::make_pusher(*(m_log), record, "%s", m_formatter.format(record));
}
```

This fix should help to avoid these cases.