mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-03 10:21:51 +00:00
commit
880b17a45c
@ -638,7 +638,6 @@ static void v8js_execute_script(zval *this_ptr, v8js_script *res, long flags, lo
|
|||||||
static PHP_METHOD(V8Js, executeString)
|
static PHP_METHOD(V8Js, executeString)
|
||||||
{
|
{
|
||||||
zend_string *str = NULL, *identifier = NULL;
|
zend_string *str = NULL, *identifier = NULL;
|
||||||
int str_len = 0, identifier_len = 0;
|
|
||||||
long flags = V8JS_FLAG_NONE, time_limit = 0, memory_limit = 0;
|
long flags = V8JS_FLAG_NONE, time_limit = 0, memory_limit = 0;
|
||||||
v8js_script *res = NULL;
|
v8js_script *res = NULL;
|
||||||
|
|
||||||
@ -671,7 +670,6 @@ static PHP_METHOD(V8Js, executeString)
|
|||||||
static PHP_METHOD(V8Js, compileString)
|
static PHP_METHOD(V8Js, compileString)
|
||||||
{
|
{
|
||||||
zend_string *str = NULL, *identifier = NULL;
|
zend_string *str = NULL, *identifier = NULL;
|
||||||
int str_len = 0, identifier_len = 0;
|
|
||||||
v8js_script *res = NULL;
|
v8js_script *res = NULL;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|S", &str, &identifier) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|S", &str, &identifier) == FAILURE) {
|
||||||
@ -686,7 +684,6 @@ static PHP_METHOD(V8Js, compileString)
|
|||||||
ctx = Z_V8JS_CTX_OBJ_P(getThis());
|
ctx = Z_V8JS_CTX_OBJ_P(getThis());
|
||||||
ctx->script_objects.push_back(res);
|
ctx->script_objects.push_back(res);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
@ -716,7 +713,6 @@ static PHP_METHOD(V8Js, executeScript)
|
|||||||
static PHP_METHOD(V8Js, checkString)
|
static PHP_METHOD(V8Js, checkString)
|
||||||
{
|
{
|
||||||
zend_string *str = NULL;
|
zend_string *str = NULL;
|
||||||
int str_len = 0;
|
|
||||||
zend_string *identifier = zend_string_init("V8Js::checkString()", 19, 0);
|
zend_string *identifier = zend_string_init("V8Js::checkString()", 19, 0);
|
||||||
|
|
||||||
v8js_script *res = NULL;
|
v8js_script *res = NULL;
|
||||||
|
@ -39,10 +39,11 @@ static void v8js_call_php_func(zend_object *object, zend_function *method_ptr, v
|
|||||||
v8::Handle<v8::Value> return_value = V8JS_NULL;
|
v8::Handle<v8::Value> return_value = V8JS_NULL;
|
||||||
zend_fcall_info fci;
|
zend_fcall_info fci;
|
||||||
zend_fcall_info_cache fcc;
|
zend_fcall_info_cache fcc;
|
||||||
zval fname, retval, **argv = NULL;
|
zval fname, retval;
|
||||||
unsigned int argc = info.Length(), min_num_args = 0, max_num_args = 0;
|
unsigned int argc = info.Length(), min_num_args = 0, max_num_args = 0;
|
||||||
char *error;
|
char *error;
|
||||||
int error_len, i;
|
int error_len;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
v8js_ctx *ctx = (v8js_ctx *) isolate->GetData(0);
|
v8js_ctx *ctx = (v8js_ctx *) isolate->GetData(0);
|
||||||
|
|
||||||
@ -779,7 +780,7 @@ static v8::Handle<v8::Object> v8js_wrap_object(v8::Isolate *isolate, zend_class_
|
|||||||
bool has_array_access = false;
|
bool has_array_access = false;
|
||||||
bool has_countable = false;
|
bool has_countable = false;
|
||||||
|
|
||||||
for (int i = 0; i < ce->num_interfaces; i ++) {
|
for (unsigned int i = 0; i < ce->num_interfaces; i ++) {
|
||||||
if (strcmp (ZSTR_VAL(ce->interfaces[i]->name), "ArrayAccess") == 0) {
|
if (strcmp (ZSTR_VAL(ce->interfaces[i]->name), "ArrayAccess") == 0) {
|
||||||
has_array_access = true;
|
has_array_access = true;
|
||||||
}
|
}
|
||||||
|
@ -510,8 +510,6 @@ static void v8js_v8generator_next(v8js_v8generator *g) /* {{{ */
|
|||||||
* some memory on bailout. */
|
* some memory on bailout. */
|
||||||
{
|
{
|
||||||
std::function< v8::Local<v8::Value>(v8::Isolate *) > v8_call = [g](v8::Isolate *isolate) {
|
std::function< v8::Local<v8::Value>(v8::Isolate *) > v8_call = [g](v8::Isolate *isolate) {
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
v8::Local<v8::String> method_name = V8JS_STR("next");
|
v8::Local<v8::String> method_name = V8JS_STR("next");
|
||||||
v8::Local<v8::Object> v8obj = v8::Local<v8::Value>::New(isolate, g->v8obj.v8obj)->ToObject();
|
v8::Local<v8::Object> v8obj = v8::Local<v8::Value>::New(isolate, g->v8obj.v8obj)->ToObject();
|
||||||
v8::Local<v8::Function> cb = v8::Local<v8::Function>::Cast(v8obj->Get(method_name));;
|
v8::Local<v8::Function> cb = v8::Local<v8::Function>::Cast(v8obj->Get(method_name));;
|
||||||
|
Loading…
Reference in New Issue
Block a user