Permalink
Browse files

Remove unneeded env in erlv8_delete.cc

  • Loading branch information...
1 parent 320d972 commit 69a61c1bd393be8765c30f2514e01887789724ab @evax evax committed Mar 22, 2011
Showing with 2 additions and 5 deletions.
  1. +2 −5 c_src/erlv8_delete.cc
View
@@ -1,12 +1,10 @@
#include "erlv8.hh"
TickHandler(DeleteTickHandler) {
- ErlNifEnv *ref_env = enif_alloc_env();
- ERL_NIF_TERM delete_ref = enif_make_copy(ref_env, tick_ref);
val_res_t *obj_res;
if (enif_get_resource(vm->env,array[1],val_resource,(void **)(&obj_res))) {
LHCS(obj_res->ctx);
- v8::Handle<v8::Value> key = term_to_js(ref_env,array[2]);
+ v8::Handle<v8::Value> key = term_to_js(vm->env,array[2]);
if (key->IsString()) {
obj_res->val->ToObject()->Delete(key->ToString());
} else if (key->IsNumber()) {
@@ -16,10 +14,9 @@ TickHandler(DeleteTickHandler) {
SEND(vm->server,
enif_make_tuple3(env,
enif_make_atom(env,"result"),
- enif_make_copy(env,delete_ref),
+ enif_make_copy(env,tick_ref),
enif_make_atom(env, "ok")));
}
- enif_free_env(ref_env);
return DONE;
}

0 comments on commit 69a61c1

Please sign in to comment.