From 63a148ad324630363ff377ec6dea676869838882 Mon Sep 17 00:00:00 2001 From: Orvid King Date: Fri, 15 Jan 2016 11:20:52 -0800 Subject: [PATCH] Switch ext_password to use the new const registering macros Summary: This was split out of #6365 (D48705) to make reviewing easier. Closes https://github.com/facebook/hhvm/pull/6477 Reviewed By: paulbiss Differential Revision: D2637295 fb-gh-sync-id: 95be9d4f08a4b342e1f57d2a507a31bd52503d2c --- hphp/runtime/ext/password/ext_password.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/hphp/runtime/ext/password/ext_password.cpp b/hphp/runtime/ext/password/ext_password.cpp index b6f01e245c229..1d5d55f353076 100644 --- a/hphp/runtime/ext/password/ext_password.cpp +++ b/hphp/runtime/ext/password/ext_password.cpp @@ -19,22 +19,13 @@ #include "hphp/runtime/vm/native-data.h" namespace HPHP { -const StaticString s_PASSWORD_BCRYPT("PASSWORD_BCRYPT"); -const StaticString s_PASSWORD_DEFAULT("PASSWORD_DEFAULT"); - -const int64_t k_PASSWORD_BCRYPT = 1; -const int64_t k_PASSWORD_DEFAULT = k_PASSWORD_BCRYPT; class PasswordExtension final : public Extension { public: PasswordExtension() : Extension("password") {} void moduleInit() override { - Native::registerConstant( - s_PASSWORD_BCRYPT.get(), k_PASSWORD_BCRYPT - ); - Native::registerConstant( - s_PASSWORD_DEFAULT.get(), k_PASSWORD_DEFAULT - ); + HHVM_RC_INT(PASSWORD_BCRYPT, 1); + HHVM_RC_INT(PASSWORD_DEFAULT, 1 /* PASSWORD_BCRYPT */); loadSystemlib(); }