Permalink
Browse files

yaf 2.2.2 released

  • Loading branch information...
1 parent b9d9928 commit 360ea717759a91f56a00e545445a9e23416ab377 @laruence committed Sep 14, 2012
Showing with 56 additions and 22 deletions.
  1. +11 −6 configs/ini.c
  2. +10 −5 configs/simple.c
  3. +26 −5 package2.xml
  4. +2 −2 php_yaf.h
  5. +2 −2 routes/static.c
  6. +3 −0 tests/054.phpt
  7. +2 −2 views/simple.c
View
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ini.c 327591 2012-09-10 10:56:13Z laruence $ */
+/* $Id: ini.c 327626 2012-09-13 02:57:39Z laruence $ */
zend_class_entry *yaf_config_ini_ce;
@@ -751,11 +751,16 @@ PHP_METHOD(yaf_config_ini, key) {
char *string;
ulong index;
- prop = zend_read_property(yaf_config_ini_ce, getThis(), ZEND_STRL(YAF_CONFIG_PROPERT_NAME), 1 TSRMLS_CC);
- if (zend_hash_get_current_key(Z_ARRVAL_P(prop), &string, &index, 0) == HASH_KEY_IS_LONG) {
- RETURN_LONG(index);
- } else {
- RETURN_STRING(string, 1);
+ prop = zend_read_property(yaf_config_ini_ce, getThis(), ZEND_STRL(YAF_CONFIG_PROPERT_NAME), 0 TSRMLS_CC);
+ switch (zend_hash_get_current_key(Z_ARRVAL_P(prop), &string, &index, 0)) {
+ case HASH_KEY_IS_LONG:
+ RETURN_LONG(index);
+ break;
+ case HASH_KEY_IS_STRING:
+ RETURN_STRING(string, 1);
+ break;
+ default:
+ RETURN_FALSE;
}
}
/* }}} */
View
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simple.c 327425 2012-09-02 03:58:49Z laruence $ */
+/* $Id: simple.c 327626 2012-09-13 02:57:39Z laruence $ */
zend_class_entry *yaf_config_simple_ce;
@@ -267,10 +267,15 @@ PHP_METHOD(yaf_config_simple, key) {
prop = zend_read_property(yaf_config_simple_ce, getThis(), ZEND_STRL(YAF_CONFIG_PROPERT_NAME), 1 TSRMLS_CC);
zend_hash_get_current_key(Z_ARRVAL_P(prop), &string, &index, 0);
- if (zend_hash_get_current_key_type(Z_ARRVAL_P(prop)) == HASH_KEY_IS_LONG) {
- RETURN_LONG(index);
- } else {
- RETURN_STRING(string, 1);
+ switch(zend_hash_get_current_key_type(Z_ARRVAL_P(prop))) {
+ case HASH_KEY_IS_LONG:
+ RETURN_LONG(index);
+ break;
+ case HASH_KEY_IS_STRING:
+ RETURN_STRING(string, 1);
+ break;
+ default:
+ RETURN_FALSE;
}
}
/* }}} */
View
@@ -10,8 +10,8 @@
<email>laruence@php.net</email>
<active>yes</active>
</lead>
- <date>2012-09-07</date>
- <time>16:01:47</time>
+ <date>2012-09-14</date>
+ <time>16:56:28</time>
<version>
<release>2.2.2</release>
<api>2.2.2</api>
@@ -144,6 +144,10 @@
<file name="048.phpt" role="test" />
<file name="049.phpt" role="test" />
<file name="050.phpt" role="test" />
+ <file name="051.phpt" role="test" />
+ <file name="052.phpt" role="test" />
+ <file name="053.phpt" role="test" />
+ <file name="054.phpt" role="test" />
<file name="build.inc" role="test" />
<file name="bug61493.phpt" role="test" />
<file name="simple.ini" role="test" />
@@ -165,10 +169,28 @@
<extsrcrelease />
<changelog>
<release>
+ <date>2012-09-14</date>
+ <version>
+ <release>2.2.2</release>
+ <api>2.2.2</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP License</license>
+ <notes>
+ - Yaf_Controller's methods are not final anymore
+ - Yaf_View_Simple is not final anymore
+ - Memleaks fixed in various place
+ </notes>
+ </release>
+
+ <release>
<date>2012-09-07</date>
<version>
- <release>2.2.0</release>
- <api>2.2.0</api>
+ <release>2.2.1</release>
+ <api>2.2.1</api>
</version>
<stability>
<release>beta</release>
@@ -179,7 +201,6 @@
- Repackage, previous one missed one fix
</notes>
</release>
-
<release>
<date>2012-09-07</date>
<version>
View
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_yaf.h 327561 2012-09-09 06:30:22Z laruence $ */
+/* $Id: php_yaf.h 327615 2012-09-12 08:57:59Z laruence $ */
#ifndef PHP_YAF_H
#define PHP_YAF_H
@@ -41,7 +41,7 @@ extern zend_module_entry yaf_module_entry;
#define YAF_G(v) (yaf_globals.v)
#endif
-#define YAF_VERSION "2.2.2-dev"
+#define YAF_VERSION "2.2.2"
#define YAF_STARTUP_FUNCTION(module) ZEND_MINIT_FUNCTION(yaf_##module)
#define YAF_RINIT_FUNCTION(module) ZEND_RINIT_FUNCTION(yaf_##module)
View
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: static.c 327548 2012-09-09 02:33:16Z laruence $ */
+/* $Id: static.c 327627 2012-09-13 06:12:38Z laruence $ */
zend_class_entry * yaf_route_static_ce;
@@ -198,7 +198,7 @@ YAF_STARTUP_FUNCTION(route_static) {
YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Static", "Yaf\\Route_Static", yaf_route_static_methods);
yaf_route_static_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
- zend_class_implements(yaf_route_static_ce TSRMLS_CC, 1, yaf_router_ce);
+ zend_class_implements(yaf_route_static_ce TSRMLS_CC, 1, yaf_route_ce);
return SUCCESS;
}
View
@@ -16,6 +16,9 @@ try {
$request = new Yaf_Request_Simple(NULL);
var_dump($request->isOptions());
+
+$config = new Yaf_Config_Simple(array());
+$config->key();
echo "okey";
?>
--EXPECTF--
View
@@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simple.c 327562 2012-09-09 06:54:44Z laruence $ */
+/* $Id: simple.c 327628 2012-09-13 06:23:11Z laruence $ */
#include "main/php_output.h"
@@ -875,7 +875,7 @@ PHP_METHOD(yaf_view_simple, clear) {
/** {{{ yaf_view_simple_methods
*/
zend_function_entry yaf_view_simple_methods[] = {
- PHP_ME(yaf_view_simple, __construct, yaf_view_simple_construct_arginfo, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
+ PHP_ME(yaf_view_simple, __construct, yaf_view_simple_construct_arginfo, ZEND_ACC_CTOR|ZEND_ACC_FINAL|ZEND_ACC_PUBLIC)
PHP_ME(yaf_view_simple, __isset, yaf_view_simple_isset_arginfo, ZEND_ACC_PUBLIC)
PHP_ME(yaf_view_simple, get, yaf_view_simple_get_arginfo, ZEND_ACC_PUBLIC)
PHP_ME(yaf_view_simple, assign, yaf_view_assign_arginfo, ZEND_ACC_PUBLIC)

0 comments on commit 360ea71

Please sign in to comment.