From: Michael Wallner Date: Fri, 10 Jan 2014 14:22:04 +0000 (+0100) Subject: Merged in remicollet/ext-ircclient/issue-030 (pull request #2) X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-ircclient;a=commitdiff_plain;h=7046465c9ae26ab2524394ac9c2505326e6def3e;hp=337cac32fcbd026c502fe2b27537693135a5d93a Merged in remicollet/ext-ircclient/issue-030 (pull request #2) More fix --- diff --git a/package.xml b/package.xml index c5681d5..7e01e1d 100644 --- a/package.xml +++ b/package.xml @@ -23,7 +23,7 @@ 2014-01-10 - 0.3.0 + 0.3.1 0.3.0 @@ -32,7 +32,8 @@ BSD, revised diff --git a/php_ircclient.c b/php_ircclient.c index bf17d5e..e1e6ab6 100644 --- a/php_ircclient.c +++ b/php_ircclient.c @@ -1418,14 +1418,15 @@ PHP_MINFO_FUNCTION(ircclient) { unsigned int high, low; char *version[2]; + char *lt16 = "<=1.6"; irc_get_version(&high, &low); spprintf(&version[1], 0, "%u.%u", high, low); #if PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH spprintf(&version[0], 0, "%u.%u", PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH, PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_LOW); #else - /* version <= 1.6 doesn't exposed its version */ - spprintf(&version[0], 0, "-"); + /* version <= 1.6 doesn't expose its version */ + version[0] = lt16; #endif php_info_print_table_start(); php_info_print_table_header(2, "IRC client support", "enabled"); @@ -1441,7 +1442,9 @@ PHP_MINFO_FUNCTION(ircclient) ); php_info_print_table_end(); - efree(version[0]); + if (version[0] != lt16) { + efree(version[0]); + } efree(version[1]); } diff --git a/php_ircclient.h b/php_ircclient.h index ce668a0..d9d81e2 100644 --- a/php_ircclient.h +++ b/php_ircclient.h @@ -6,14 +6,14 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2011, Michael Wallner | + | Copyright (c) 2014, Michael Wallner | +--------------------------------------------------------------------+ */ #ifndef PHP_IRCCLIENT_H #define PHP_IRCCLIENT_H -#define PHP_IRCCLIENT_VERSION "0.3.0" +#define PHP_IRCCLIENT_VERSION "0.3.1" extern zend_module_entry ircclient_module_entry; #define phpext_ircclient_ptr &ircclient_module_entry