Skip to content

Commit

Permalink
Merge pull request #5 from citrusleaf/hotfix
Browse files Browse the repository at this point in the history
VMRegAnchor used everywhere before entering a C library
  • Loading branch information
rbotzer committed Jul 6, 2015
2 parents 55c5dd6 + c2d9056 commit cb9f83e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/aerospike/main/ext_aerospike.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ namespace HPHP {
void HHVM_METHOD(Aerospike, __construct, const Array& php_config,
bool persistent_connection, const Variant& options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_config config;
Expand Down Expand Up @@ -289,6 +290,7 @@ namespace HPHP {
Closes all connections to the cluster */
int64_t HHVM_METHOD(Aerospike, close)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;

Expand Down Expand Up @@ -329,6 +331,7 @@ namespace HPHP {
Closes then reopens all connections to the cluster */
int64_t HHVM_METHOD(Aerospike, reconnect)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;

Expand Down Expand Up @@ -383,6 +386,7 @@ namespace HPHP {
const Array& php_rec, int64_t ttl,
const Variant& options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_key key;
Expand Down Expand Up @@ -432,6 +436,7 @@ namespace HPHP {
int64_t HHVM_METHOD(Aerospike, get, const Array& php_key, VRefParam php_rec,
const Variant& filter_bins, const Variant& options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_status status = AEROSPIKE_OK;
as_error error;
Expand Down Expand Up @@ -491,6 +496,7 @@ namespace HPHP {
VRefParam php_records, const Variant& filter_bins,
const Variant& options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_policy_batch batch_policy;
Expand Down Expand Up @@ -532,6 +538,7 @@ namespace HPHP {
const Array& php_operations, VRefParam returned,
const Variant& options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_key key;
Expand Down Expand Up @@ -588,6 +595,7 @@ namespace HPHP {
int64_t HHVM_METHOD(Aerospike, remove, const Array& php_key,
const Variant& options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_key key;
Expand Down Expand Up @@ -629,6 +637,7 @@ namespace HPHP {
int64_t HHVM_METHOD(Aerospike, removeBin, const Array& php_key,
const Array& bins, const Variant& options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_key key;
Expand Down Expand Up @@ -675,6 +684,7 @@ namespace HPHP {
int64_t HHVM_METHOD(Aerospike, exists, const Array& php_key,
VRefParam metadata, const Variant& options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_key key;
Expand Down Expand Up @@ -720,6 +730,7 @@ namespace HPHP {
int64_t HHVM_METHOD(Aerospike, existsMany, const Array& php_keys,
VRefParam metadata, const Variant& options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_policy_batch batch_policy;
Expand Down Expand Up @@ -760,6 +771,7 @@ namespace HPHP {
String HHVM_METHOD(Aerospike, getKeyDigest, const Variant& ns,
const Variant& set, const Variant& primary_key)
{
VMRegAnchor _;
as_error error;
as_key key;
char *digest_p = NULL;
Expand All @@ -779,6 +791,7 @@ namespace HPHP {
Returns all the records in a set to a callback method */
int64_t HHVM_METHOD(Aerospike, scan, const Variant &ns, const Variant &set, const Variant &function, const Variant &bins, const Variant &options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_scan scan;
Expand Down Expand Up @@ -825,6 +838,7 @@ namespace HPHP {
Applies a record UDF to each record of a set using a background scan */
int64_t HHVM_METHOD(Aerospike, scanApply, const Variant &ns, const Variant &set, const Variant &module, const Variant &function, const Variant &args, VRefParam scan_id, const Variant &options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_scan scan;
Expand Down Expand Up @@ -885,6 +899,7 @@ namespace HPHP {
Gets the status of a background scan triggered by scanApply() */
int64_t HHVM_METHOD(Aerospike, scanInfo, const Variant &scan_id, VRefParam scan_info, const Variant &options)
{
VMRegAnchor _;
auto data = Native::data<Aerospike>(this_);
as_error error;
as_scan_info _scan_info;
Expand Down

0 comments on commit cb9f83e

Please sign in to comment.