mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 22:51:51 +00:00
fix compiler warnings
This commit is contained in:
parent
3d5f163899
commit
c804b16e4c
@ -671,7 +671,7 @@ static void v8js_execute_script(zval *this_ptr, v8js_script *res, long flags, lo
|
|||||||
*/
|
*/
|
||||||
static PHP_METHOD(V8Js, executeString)
|
static PHP_METHOD(V8Js, executeString)
|
||||||
{
|
{
|
||||||
char *str = NULL, *identifier = NULL, *tz = NULL;
|
char *str = NULL, *identifier = NULL;
|
||||||
int str_len = 0, identifier_len = 0;
|
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;
|
||||||
|
@ -46,7 +46,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8::
|
|||||||
v8::Handle<v8::Message> tc_message = try_catch->Message();
|
v8::Handle<v8::Message> tc_message = try_catch->Message();
|
||||||
const char *filename_string, *sourceline_string;
|
const char *filename_string, *sourceline_string;
|
||||||
char *message_string;
|
char *message_string;
|
||||||
int linenum, start_col, end_col, message_len;
|
int linenum, start_col, end_col;
|
||||||
|
|
||||||
object_init_ex(return_value, php_ce_v8js_script_exception);
|
object_init_ex(return_value, php_ce_v8js_script_exception);
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8::
|
|||||||
zend_update_property##type(php_ce_v8js_script_exception, return_value, #name, sizeof(#name) - 1, value TSRMLS_CC);
|
zend_update_property##type(php_ce_v8js_script_exception, return_value, #name, sizeof(#name) - 1, value TSRMLS_CC);
|
||||||
|
|
||||||
if (tc_message.IsEmpty()) {
|
if (tc_message.IsEmpty()) {
|
||||||
message_len = spprintf(&message_string, 0, "%s", exception_string);
|
spprintf(&message_string, 0, "%s", exception_string);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -75,7 +75,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8::
|
|||||||
end_col = tc_message->GetEndColumn();
|
end_col = tc_message->GetEndColumn();
|
||||||
PHPV8_EXPROP(_long, JsEndColumn, end_col);
|
PHPV8_EXPROP(_long, JsEndColumn, end_col);
|
||||||
|
|
||||||
message_len = spprintf(&message_string, 0, "%s:%d: %s", filename_string, linenum, exception_string);
|
spprintf(&message_string, 0, "%s:%d: %s", filename_string, linenum, exception_string);
|
||||||
|
|
||||||
v8::String::Utf8Value stacktrace(try_catch->StackTrace());
|
v8::String::Utf8Value stacktrace(try_catch->StackTrace());
|
||||||
if (stacktrace.length() > 0) {
|
if (stacktrace.length() > 0) {
|
||||||
|
@ -112,7 +112,7 @@ static void v8js_dumper(v8::Isolate *isolate, v8::Local<v8::Value> var, int leve
|
|||||||
|
|
||||||
if (var->IsString())
|
if (var->IsString())
|
||||||
{
|
{
|
||||||
php_printf("string(%zu) \"", valstr_len, valstr);
|
php_printf("string(%zu) \"", valstr_len);
|
||||||
PHPWRITE(valstr, valstr_len);
|
PHPWRITE(valstr, valstr_len);
|
||||||
php_printf("\"\n");
|
php_printf("\"\n");
|
||||||
}
|
}
|
||||||
@ -464,7 +464,7 @@ V8JS_METHOD(require)
|
|||||||
c->modules_base.push_back(normalised_path);
|
c->modules_base.push_back(normalised_path);
|
||||||
|
|
||||||
// Run script
|
// Run script
|
||||||
v8::Local<v8::Value> result = script->Run();
|
script->Run();
|
||||||
|
|
||||||
// Remove this module and path from the stack
|
// Remove this module and path from the stack
|
||||||
c->modules_stack.pop_back();
|
c->modules_stack.pop_back();
|
||||||
|
@ -194,7 +194,6 @@ static void v8js_v8object_unset_property(zval *object, zval *member ZEND_HASH_KE
|
|||||||
static HashTable *v8js_v8object_get_properties(zval *object TSRMLS_DC) /* {{{ */
|
static HashTable *v8js_v8object_get_properties(zval *object TSRMLS_DC) /* {{{ */
|
||||||
{
|
{
|
||||||
v8js_v8object *obj = (v8js_v8object *) zend_object_store_get_object(object TSRMLS_CC);
|
v8js_v8object *obj = (v8js_v8object *) zend_object_store_get_object(object TSRMLS_CC);
|
||||||
HashTable *retval;
|
|
||||||
|
|
||||||
if (obj->properties == NULL) {
|
if (obj->properties == NULL) {
|
||||||
if (GC_G(gc_active)) {
|
if (GC_G(gc_active)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user