diff --git a/package.xml b/package.xml index 622ecd3..e274b5b 100644 --- a/package.xml +++ b/package.xml @@ -1,41 +1,77 @@ - - - + + v8js + pecl.php.net V8 Javascript Engine for PHP - This extension embeds the Google's V8 Javascript Engine into PHP. + + This extension embeds the Google's V8 Javascript Engine into PHP. - - - jani - Jani Taskinen - jani@php.net - lead - - - - 0.1.0 - 2010-12-30 - PHP - beta - - Initial PECL release - - - - - - - - - - - - - - - - - - - + + Jani Taskinen + jani + jani@php.net + yes + + 2010-12-30 + + + 0.1.0 + 0.1.0 + + + beta + beta + + PHP + - Initial PECL release + + + + + + + + + + + + + + + + + + 5.3.3 + + + 1.4.0 + + + + v8js + + + + + + 0.1.10.1.1 + betabeta + 2010-12-31 + +- Fixed crash bug in setting v8.flags ini directive. +- Added notice to registerExtension() if trying to use it when V8 is already initialized. + + + + 0.1.00.1.0 + betabeta + 2010-12-30 + +- Initial PECL release. + + + diff --git a/package2.xml b/package2.xml deleted file mode 100644 index 238c141..0000000 --- a/package2.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - v8js - pecl.php.net - V8 Javascript Engine for PHP - - This extension embeds the Google's V8 Javascript Engine into PHP. - - - Jani Taskinen - jani - jani@php.net - yes - - 2010-12-30 - - - 0.1.0 - 0.1.0 - - - beta - beta - - PHP - - Initial PECL release - - - - - - - - - - - - - - - - - - 5.3.3 - - - 1.4.0 - - - - v8js - - - - - - - 0.1.0 - 0.1.0 - - - beta - beta - - 2010-12-30 - - Initial PECL release. - - - - diff --git a/php_v8js_macros.h b/php_v8js_macros.h index b82474f..cdd9cef 100644 --- a/php_v8js_macros.h +++ b/php_v8js_macros.h @@ -24,7 +24,7 @@ #include /* V8Js Version */ -#define V8JS_VERSION "0.1.0" +#define V8JS_VERSION "0.1.1" /* Helper macros */ #define V8JS_SYM(v) v8::String::NewSymbol(v, sizeof(v) - 1) diff --git a/v8js.cc b/v8js.cc index 77c3de7..5e1ddf0 100644 --- a/v8js.cc +++ b/v8js.cc @@ -49,7 +49,7 @@ ZEND_BEGIN_MODULE_GLOBALS(v8js) int disposed_contexts; /* Disposed contexts since last time V8 did GC */ /* Ini globals */ - zval *v8_flags; /* V8 command line flags */ + char *v8_flags; /* V8 command line flags */ int max_disposed_contexts; /* Max disposed context allowed before forcing V8 GC */ ZEND_END_MODULE_GLOBALS(v8js) @@ -81,24 +81,22 @@ static ZEND_INI_MH(v8js_OnUpdateV8Flags) /* {{{ */ { if (new_value) { if (V8JSG(v8_flags)) { - zval_ptr_dtor(&V8JSG(v8_flags)); + free(V8JSG(v8_flags)); V8JSG(v8_flags) = NULL; } if (!new_value[0]) { return FAILURE; } + V8JSG(v8_flags) = zend_strndup(new_value, new_value_length); } - MAKE_STD_ZVAL(V8JSG(v8_flags)); - ZVAL_STRINGL(V8JSG(v8_flags), new_value, new_value_length, 1); - return SUCCESS; } /* }}} */ ZEND_INI_BEGIN() /* {{{ */ ZEND_INI_ENTRY("v8js.max_disposed_contexts", "25", ZEND_INI_ALL, v8js_OnUpdateMaxDisposedContexts) - ZEND_INI_ENTRY("v8js.flags", "", ZEND_INI_ALL, v8js_OnUpdateV8Flags) + ZEND_INI_ENTRY("v8js.flags", NULL, ZEND_INI_ALL, v8js_OnUpdateV8Flags) ZEND_INI_END() /* }}} */ @@ -535,7 +533,7 @@ static void php_v8js_init(TSRMLS_D) /* {{{ */ /* Set V8 command line flags (must be done before V8::Initialize()!) */ if (V8JSG(v8_flags)) { - v8::V8::SetFlagsFromString(Z_STRVAL_P(V8JSG(v8_flags)), Z_STRLEN_P(V8JSG(v8_flags))); + v8::V8::SetFlagsFromString(V8JSG(v8_flags), strlen(V8JSG(v8_flags))); } /* Initialize V8 */ @@ -1195,6 +1193,11 @@ static PHP_MSHUTDOWN_FUNCTION(v8js) V8JSG(extensions) = NULL; } + if (V8JSG(v8_flags)) { + free(V8JSG(v8_flags)); + V8JSG(v8_flags) = NULL; + } + return SUCCESS; } /* }}} */