예제 #1
0
void IniSetting::SystemParserCallback::onConstant(std::string &result,
                                                  const std::string &name) {
  if (f_defined(name, false)) {
    result = f_constant(name).toString().toCppString();
  } else {
    result = name;
  }
}
예제 #2
0
void IniSetting::SystemParserCallback::onConstant(std::string &result,
        const std::string &name) {
    if (MemoryManager::TlsWrapper::isNull()) {
        // We can't load constants before the memory manger is up, so lets just
        // pretend they are strings I guess
        result = name;
        return;
    }

    if (f_defined(name, false)) {
        result = f_constant(name).toString().toCppString();
    } else {
        result = name;
    }
}
예제 #3
0
bool TestExtMisc::test_constant() {
  f_constant("a");
  return Count(true);
}