コード例 #1
0
ファイル: ini-setting.cpp プロジェクト: Tintazul/hhvm
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
ファイル: ini-setting.cpp プロジェクト: 409033632/hhvm
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_defined() {
  VERIFY(!f_defined("a"));
  return Count(true);
}