Skip to content

Commit

Permalink
Switch ext_password to use the new const registering macros
Browse files Browse the repository at this point in the history
Summary:
This was split out of #6365 (D48705) to make reviewing easier.
Closes #6477

Reviewed By: paulbiss

Differential Revision: D2637295

fb-gh-sync-id: 95be9d4f08a4b342e1f57d2a507a31bd52503d2c
  • Loading branch information
Orvid authored and hhvm-bot committed Jan 15, 2016
1 parent 23c7b9c commit 63a148a
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions hphp/runtime/ext/password/ext_password.cpp
Expand Up @@ -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<KindOfInt64>(
s_PASSWORD_BCRYPT.get(), k_PASSWORD_BCRYPT
);
Native::registerConstant<KindOfInt64>(
s_PASSWORD_DEFAULT.get(), k_PASSWORD_DEFAULT
);
HHVM_RC_INT(PASSWORD_BCRYPT, 1);
HHVM_RC_INT(PASSWORD_DEFAULT, 1 /* PASSWORD_BCRYPT */);

loadSystemlib();
}
Expand Down

0 comments on commit 63a148a

Please sign in to comment.