Permalink
Browse files

switched to The BSD 3-Clause License

  • Loading branch information...
1 parent ee43586 commit 70c9aa441b5a212dc537b2ce792b7b5740b1f051 @zenovich committed Jan 2, 2012
Showing with 71 additions and 60 deletions.
  1. +11 −0 LICENSE
  2. +4 −4 php_runkit.h
  3. +6 −6 runkit.c
  4. +4 −4 runkit_classes.c
  5. +4 −4 runkit_constants.c
  6. +5 −5 runkit_functions.c
  7. +13 −13 runkit_import.c
  8. +8 −8 runkit_methods.c
  9. +4 −4 runkit_props.c
  10. +8 −8 runkit_sandbox.c
  11. +4 −4 runkit_sandbox_parent.c
View
11 LICENSE
@@ -0,0 +1,11 @@
+Copyright (c) 2008-2012, Dmitry Zenovich
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * The names of contributors of "runkit" may not be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
View
@@ -2,13 +2,13 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group, (c) 2008-2012 Dmitry Zenovich |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to the new BSD license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
+ | http://www.opensource.org/licenses/BSD-3-Clause |
+ | If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
View
@@ -2,13 +2,13 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group, (c) 2008-2012 Dmitry Zenovich |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to the new BSD license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
+ | http://www.opensource.org/licenses/BSD-3-Clause |
+ | If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
@@ -139,7 +139,7 @@ zend_module_entry runkit_module_entry = {
PHP_RSHUTDOWN(runkit),
PHP_MINFO(runkit),
#if ZEND_MODULE_API_NO >= 20010901
- PHP_RUNKIT_VERSION,
+ PHP_RUNKIT_VERSION,
#endif
STANDARD_MODULE_PROPERTIES
};
@@ -174,7 +174,7 @@ static void php_runkit_globals_ctor(zend_runkit_globals *runkit_global TSRMLS_DC
#define php_runkit_feature_constant(feature, enabled) \
_php_runkit_feature_constant("RUNKIT_FEATURE_" #feature, sizeof("RUNKIT_FEATURE_" #feature), (enabled), \
CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC)
-static void _php_runkit_feature_constant(const char *name, size_t name_len, zend_bool enabled,
+static void _php_runkit_feature_constant(const char *name, size_t name_len, zend_bool enabled,
int flags, int module_number TSRMLS_DC)
{
zend_constant c;
View
@@ -2,13 +2,13 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group, (c) 2008-2012 Dmitry Zenovich |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to the new BSD license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
+ | http://www.opensource.org/licenses/BSD-3-Clause |
+ | If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
View
@@ -2,13 +2,13 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group, (c) 2008-2012 Dmitry Zenovich |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to the new BSD license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
+ | http://www.opensource.org/licenses/BSD-3-Clause |
+ | If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
View
@@ -2,13 +2,13 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group, (c) 2008-2012 Dmitry Zenovich |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to the new BSD license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
+ | http://www.opensource.org/licenses/BSD-3-Clause |
+ | If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
@@ -441,7 +441,7 @@ PHP_FUNCTION(runkit_function_copy)
PHP_RUNKIT_DECL_STRING_PARAM(dfunc)
zend_function *fe;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
PHP_RUNKIT_STRING_SPEC "/" PHP_RUNKIT_STRING_SPEC "/",
PHP_RUNKIT_STRING_PARAM(sfunc),
PHP_RUNKIT_STRING_PARAM(dfunc)) == FAILURE) {
View
@@ -2,13 +2,13 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group, (c) 2008-2012 Dmitry Zenovich |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to the new BSD license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
+ | http://www.opensource.org/licenses/BSD-3-Clause |
+ | If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
@@ -43,9 +43,9 @@ static int php_runkit_import_functions(HashTable *function_table, long flags TSR
new_key = fe->common.function_name;
new_key_len = strlen(new_key) + 1;
- if (((type = zend_hash_get_current_key_ex(function_table, &key, &key_len, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT) &&
+ if (((type = zend_hash_get_current_key_ex(function_table, &key, &key_len, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT) &&
fe && fe->type == ZEND_USER_FUNCTION) {
-
+
if (type == HASH_KEY_IS_STRING) {
new_key = key;
new_key_len = key_len;
@@ -112,7 +112,7 @@ static int php_runkit_import_class_methods(zend_class_entry *dce, zend_class_ent
zend_function *dfe;
int fn_len = strlen(fe->common.function_name);
zend_class_entry *fe_scope = php_runkit_locate_scope(ce, fe, fe->common.function_name, fn_len);
-
+
if (fe_scope != ce) {
/* This is an inhereted function, let's skip it */
zend_hash_move_forward_ex(&ce->function_table, &pos);
@@ -354,7 +354,7 @@ static int php_runkit_import_classes(HashTable *class_table, long flags TSRMLS_D
return FAILURE;
}
- if (((type = zend_hash_get_current_key_ex(EG(class_table), &key, &key_len, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT) &&
+ if (((type = zend_hash_get_current_key_ex(EG(class_table), &key, &key_len, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT) &&
ce && ce->type == ZEND_USER_CLASS) {
zend_class_entry *dce;
@@ -366,7 +366,7 @@ static int php_runkit_import_classes(HashTable *class_table, long flags TSRMLS_D
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot redeclare class %s", ce->name);
continue;
}
-
+
if (flags & PHP_RUNKIT_IMPORT_CLASS_METHODS) {
php_runkit_import_class_methods(dce, ce, (flags & PHP_RUNKIT_IMPORT_OVERRIDE) TSRMLS_CC);
}
@@ -465,7 +465,7 @@ static zend_op_array *php_runkit_compile_filename(int type, zval *filename TSRML
/* }}} */
/* {{{ array runkit_import(string filename[, long flags])
- Import functions and class definitions from a file
+ Import functions and class definitions from a file
Similar to include(), but doesn't execute root op_array, and allows pre-existing functions/methods to be overridden */
PHP_FUNCTION(runkit_import)
{
@@ -491,18 +491,18 @@ PHP_FUNCTION(runkit_import)
class_table = (HashTable *) emalloc(sizeof(HashTable));
zend_hash_init_ex(class_table, 10, NULL, ZEND_CLASS_DTOR, 0, 0);
function_table = (HashTable *) emalloc(sizeof(HashTable));
- zend_hash_init_ex(function_table, 100, NULL, ZEND_FUNCTION_DTOR, 0, 0);
+ zend_hash_init_ex(function_table, 100, NULL, ZEND_FUNCTION_DTOR, 0, 0);
current_class_table = CG(class_table);
CG(class_table) = class_table;
current_function_table = CG(function_table);
CG(function_table) = function_table;
new_op_array = local_compile_filename(ZEND_INCLUDE, filename TSRMLS_CC);
-
+
CG(class_table) = current_class_table;
CG(function_table) = current_function_table;
-
+
if (!new_op_array) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Import Failure");
RETURN_FALSE;
View
@@ -2,13 +2,13 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group, (c) 2008-2012 Dmitry Zenovich |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to the new BSD license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
+ | http://www.opensource.org/licenses/BSD-3-Clause |
+ | If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
@@ -161,7 +161,7 @@ int php_runkit_fetch_interface(char *classname, int classname_len, zend_class_en
/* {{{ php_runkit_fetch_class_method
*/
-static int php_runkit_fetch_class_method(char *classname, int classname_len, char *fname, int fname_len, zend_class_entry **pce, zend_function **pfe
+static int php_runkit_fetch_class_method(char *classname, int classname_len, char *fname, int fname_len, zend_class_entry **pce, zend_function **pfe
TSRMLS_DC)
{
HashTable *ftable = EG(function_table);
@@ -434,7 +434,7 @@ static void php_runkit_method_add_or_update(INTERNAL_FUNCTION_PARAMETERS, int ad
}
#endif
- zend_hash_apply_with_arguments(RUNKIT_53_TSRMLS_PARAM(EG(class_table)), (apply_func_args_t)php_runkit_update_children_methods, 5, ancestor_class, ce, &func, methodname,
+ zend_hash_apply_with_arguments(RUNKIT_53_TSRMLS_PARAM(EG(class_table)), (apply_func_args_t)php_runkit_update_children_methods, 5, ancestor_class, ce, &func, methodname,
methodname_len);
if (zend_hash_add_or_update(&ce->function_table, methodname_lower, methodname_len + 1, &func, sizeof(zend_function), NULL, add_or_update) == FAILURE) {
@@ -493,7 +493,7 @@ static int php_runkit_method_copy(char *dclass, int dclass_len, char *dfunc, int
}
dfe = *sfe;
- php_runkit_function_copy_ctor(&dfe, estrndup(dfunc, dfunc_len));
+ php_runkit_function_copy_ctor(&dfe, estrndup(dfunc, dfunc_len));
#ifdef ZEND_ENGINE_2
dfe.common.scope = dce;
@@ -624,7 +624,7 @@ PHP_FUNCTION(runkit_method_rename)
}
ancestor_class = php_runkit_locate_scope(ce, fe, methodname, methodname_len);
- zend_hash_apply_with_arguments(RUNKIT_53_TSRMLS_PARAM(EG(class_table)), (apply_func_args_t)php_runkit_clean_children_methods, 4, ancestor_class, ce, methodname,
+ zend_hash_apply_with_arguments(RUNKIT_53_TSRMLS_PARAM(EG(class_table)), (apply_func_args_t)php_runkit_clean_children_methods, 4, ancestor_class, ce, methodname,
methodname_len);
func = *fe;
View
@@ -2,13 +2,13 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2006 The PHP Group |
+ | Copyright (c) 1997-2006 The PHP Group, (c) 2008-2012 Dmitry Zenovich |
+----------------------------------------------------------------------+
- | This source file is subject to version 3.0 of the PHP license, |
+ | This source file is subject to the new BSD license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_0.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
+ | http://www.opensource.org/licenses/BSD-3-Clause |
+ | If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
Oops, something went wrong.

0 comments on commit 70c9aa4

Please sign in to comment.