[PHP-CVS] cvs: php-src /ext/ncurses ncurses_functions.c

2005-12-05 Thread Jani Taskinen
sniper  Mon Dec  5 19:43:38 2005 EDT

  Modified files:  
/php-src/ext/ncursesncurses_functions.c 
  Log:
  - nuke php3 legacy
  
http://cvs.php.net/diff.php/php-src/ext/ncurses/ncurses_functions.c?r1=1.49r2=1.50ty=u
Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.49 
php-src/ext/ncurses/ncurses_functions.c:1.50
--- php-src/ext/ncurses/ncurses_functions.c:1.49Wed Aug  3 10:07:31 2005
+++ php-src/ext/ncurses/ncurses_functions.c Mon Dec  5 19:43:35 2005
@@ -1824,7 +1824,7 @@
}
IS_NCURSES_INITIALIZED();
 
-   pval_destructor(arg);
+   zval_dtor(arg);
array_init(arg);
 
retval = getmouse(mevent);
@@ -1843,7 +1843,7 @@
Pushes mouse event to queue */
 PHP_FUNCTION(ncurses_ungetmouse)
 {
-   zval *arg, **pvalue;
+   zval *arg, **zvalue;
MEVENT mevent;
ulong retval;
 
@@ -1852,29 +1852,29 @@
}
IS_NCURSES_INITIALIZED();
 
-   if (zend_hash_find(Z_ARRVAL_P(arg), id, sizeof(id), (void **) 
pvalue) == SUCCESS) {
-   convert_to_long_ex(pvalue);
-   mevent.id = Z_LVAL_PP(pvalue);
+   if (zend_hash_find(Z_ARRVAL_P(arg), id, sizeof(id), (void **) 
zvalue) == SUCCESS) {
+   convert_to_long_ex(zvalue);
+   mevent.id = Z_LVAL_PP(zvalue);
}
 
-   if (zend_hash_find(Z_ARRVAL_P(arg), x, sizeof(x), (void **) 
pvalue) == SUCCESS) {
-   convert_to_long_ex(pvalue);
-   mevent.x = Z_LVAL_PP(pvalue);
+   if (zend_hash_find(Z_ARRVAL_P(arg), x, sizeof(x), (void **) 
zvalue) == SUCCESS) {
+   convert_to_long_ex(zvalue);
+   mevent.x = Z_LVAL_PP(zvalue);
}
 
-   if (zend_hash_find(Z_ARRVAL_P(arg), y, sizeof(y), (void **) 
pvalue) == SUCCESS) {
-   convert_to_long_ex(pvalue);
-   mevent.y = Z_LVAL_PP(pvalue);
+   if (zend_hash_find(Z_ARRVAL_P(arg), y, sizeof(y), (void **) 
zvalue) == SUCCESS) {
+   convert_to_long_ex(zvalue);
+   mevent.y = Z_LVAL_PP(zvalue);
}
 
-   if (zend_hash_find(Z_ARRVAL_P(arg), z, sizeof(z), (void **) 
pvalue) == SUCCESS) {
-   convert_to_long_ex(pvalue);
-   mevent.z = Z_LVAL_PP(pvalue);
+   if (zend_hash_find(Z_ARRVAL_P(arg), z, sizeof(z), (void **) 
zvalue) == SUCCESS) {
+   convert_to_long_ex(zvalue);
+   mevent.z = Z_LVAL_PP(zvalue);
}
 
-   if (zend_hash_find(Z_ARRVAL_P(arg), mmask, sizeof(mmask), (void **) 
pvalue) == SUCCESS) {
-   convert_to_long_ex(pvalue);
-   mevent.bstate = Z_LVAL_PP(pvalue);
+   if (zend_hash_find(Z_ARRVAL_P(arg), mmask, sizeof(mmask), (void **) 
zvalue) == SUCCESS) {
+   convert_to_long_ex(zvalue);
+   mevent.bstate = Z_LVAL_PP(zvalue);
}
 
retval = ungetmouse(mevent);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/ncurses ncurses_functions.c

2005-04-18 Thread Andi Gutmans
I think you are wrong. It should give a nice warning message.
It's pointless in doing this, because you could have other copies of the 
resource in other PHP variables. Please nuke that...

Thanks,
Andi
At 11:38 PM 4/16/2005 +0200, Andrey Hristov wrote:
  Hi Andi,
last time I checked with 5.1 I was getting sth like resource(%d) of 
Unknown type
 Which leads me to think that the user may pass the resource to a function
and it will greacefully go through zend_parse_parameters() and will fail 
probably
during FETCH_RESOURCE with getting a FALSE back but without any warning.
But it is possible that I am wrong.

Andrey
Andi Gutmans wrote:
Andrey,
You should remove ZVAL_NULL(). We don't NULL resource zval if they are 
deleted. PHP handles that gracefully if mistakenly accessed...
Andi
At 10:23 PM 4/10/2005 +, Andrey Hristov wrote:

andrey  Sun Apr 10 17:23:28 2005 EDT
  Modified files:
/php-src/ext/ncursesncurses_functions.c
  Log:
  fix proto. return true instead of null
http://cvs.php.net/diff.php/php-src/ext/ncurses/ncurses_functions.c?r1=1.46r2=1.47ty=u 

Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.46 
php-src/ext/ncurses/ncurses_functions.c:1.47
--- php-src/ext/ncurses/ncurses_functions.c:1.46Wed Jan 19 
21:02:09 2005
+++ php-src/ext/ncurses/ncurses_functions.c Sun Apr 10 17:23:27 2005
@@ -84,7 +84,7 @@
 /* }}} */
 #endif

-/* {{{ proto int ncurses_delwin(resource window)
+/* {{{ proto bool ncurses_delwin(resource window)
Deletes a ncurses window */
 PHP_FUNCTION(ncurses_delwin)
 {
@@ -98,6 +98,8 @@
FETCH_WINRES(w, handle);
zend_list_delete(Z_LVAL_P(handle));
+   ZVAL_NULL(handle);
+   RETURN_TRUE;
 }
 /* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php-src /ext/ncurses ncurses_functions.c

2005-04-18 Thread Andrey Hristov
andrey  Mon Apr 18 17:01:07 2005 EDT

  Modified files:  
/php-src/ext/ncursesncurses_functions.c 
  Log:
  don't null it - let the engine do its magic ;)
  
  
http://cvs.php.net/diff.php/php-src/ext/ncurses/ncurses_functions.c?r1=1.47r2=1.48ty=u
Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.47 
php-src/ext/ncurses/ncurses_functions.c:1.48
--- php-src/ext/ncurses/ncurses_functions.c:1.47Sun Apr 10 17:23:27 2005
+++ php-src/ext/ncurses/ncurses_functions.c Mon Apr 18 17:01:05 2005
@@ -98,7 +98,6 @@
FETCH_WINRES(w, handle);
 
zend_list_delete(Z_LVAL_P(handle));
-   ZVAL_NULL(handle);
RETURN_TRUE;
 }
 /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/ncurses ncurses_functions.c

2005-04-17 Thread Andrey Hristov
  Hi Andi,
last time I checked with 5.1 I was getting sth like resource(%d) of Unknown type
 Which leads me to think that the user may pass the resource to a function
and it will greacefully go through zend_parse_parameters() and will fail 
probably
during FETCH_RESOURCE with getting a FALSE back but without any warning.
But it is possible that I am wrong.
Andrey
Andi Gutmans wrote:
Andrey,
You should remove ZVAL_NULL(). We don't NULL resource zval if they are 
deleted. PHP handles that gracefully if mistakenly accessed...

Andi
At 10:23 PM 4/10/2005 +, Andrey Hristov wrote:
andrey  Sun Apr 10 17:23:28 2005 EDT
  Modified files:
/php-src/ext/ncursesncurses_functions.c
  Log:
  fix proto. return true instead of null
http://cvs.php.net/diff.php/php-src/ext/ncurses/ncurses_functions.c?r1=1.46r2=1.47ty=u 

Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.46 
php-src/ext/ncurses/ncurses_functions.c:1.47
--- php-src/ext/ncurses/ncurses_functions.c:1.46Wed Jan 19 
21:02:09 2005
+++ php-src/ext/ncurses/ncurses_functions.c Sun Apr 10 17:23:27 2005
@@ -84,7 +84,7 @@
 /* }}} */
 #endif

-/* {{{ proto int ncurses_delwin(resource window)
+/* {{{ proto bool ncurses_delwin(resource window)
Deletes a ncurses window */
 PHP_FUNCTION(ncurses_delwin)
 {
@@ -98,6 +98,8 @@
FETCH_WINRES(w, handle);
zend_list_delete(Z_LVAL_P(handle));
+   ZVAL_NULL(handle);
+   RETURN_TRUE;
 }
 /* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src /ext/ncurses ncurses_functions.c

2005-04-16 Thread Andi Gutmans
Andrey,
You should remove ZVAL_NULL(). We don't NULL resource zval if they are 
deleted. PHP handles that gracefully if mistakenly accessed...

Andi
At 10:23 PM 4/10/2005 +, Andrey Hristov wrote:
andrey  Sun Apr 10 17:23:28 2005 EDT
  Modified files:
/php-src/ext/ncursesncurses_functions.c
  Log:
  fix proto. return true instead of null
http://cvs.php.net/diff.php/php-src/ext/ncurses/ncurses_functions.c?r1=1.46r2=1.47ty=u
Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.46 
php-src/ext/ncurses/ncurses_functions.c:1.47
--- php-src/ext/ncurses/ncurses_functions.c:1.46Wed Jan 19 
21:02:09 2005
+++ php-src/ext/ncurses/ncurses_functions.c Sun Apr 10 17:23:27 2005
@@ -84,7 +84,7 @@
 /* }}} */
 #endif

-/* {{{ proto int ncurses_delwin(resource window)
+/* {{{ proto bool ncurses_delwin(resource window)
Deletes a ncurses window */
 PHP_FUNCTION(ncurses_delwin)
 {
@@ -98,6 +98,8 @@
FETCH_WINRES(w, handle);
zend_list_delete(Z_LVAL_P(handle));
+   ZVAL_NULL(handle);
+   RETURN_TRUE;
 }
 /* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php-src /ext/ncurses ncurses_functions.c

2005-04-10 Thread Andrey Hristov
andrey  Sun Apr 10 17:23:28 2005 EDT

  Modified files:  
/php-src/ext/ncursesncurses_functions.c 
  Log:
  fix proto. return true instead of null
  
  
http://cvs.php.net/diff.php/php-src/ext/ncurses/ncurses_functions.c?r1=1.46r2=1.47ty=u
Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.46 
php-src/ext/ncurses/ncurses_functions.c:1.47
--- php-src/ext/ncurses/ncurses_functions.c:1.46Wed Jan 19 21:02:09 2005
+++ php-src/ext/ncurses/ncurses_functions.c Sun Apr 10 17:23:27 2005
@@ -84,7 +84,7 @@
 /* }}} */
 #endif
 
-/* {{{ proto int ncurses_delwin(resource window)
+/* {{{ proto bool ncurses_delwin(resource window)
Deletes a ncurses window */
 PHP_FUNCTION(ncurses_delwin)
 {
@@ -98,6 +98,8 @@
FETCH_WINRES(w, handle);
 
zend_list_delete(Z_LVAL_P(handle));
+   ZVAL_NULL(handle);
+   RETURN_TRUE;
 }
 /* }}} */
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/ncurses ncurses_functions.c /sapi/cli php_cli.c ZendEngine2 zend.h zend_constants.c

2005-01-19 Thread Jani Taskinen
sniper  Wed Jan 19 21:02:09 2005 EDT

  Modified files:  
/ZendEngine2zend.h zend_constants.c 
/php-src/ext/ncursesncurses_functions.c 
/php-src/sapi/cli   php_cli.c 
  Log:
  - Revert the weird change of ZEND_STRS() macro and use the correct 
ZEND_STRL() macro. 
  # ZEND_STRS was changed to be same as ZEND_STRL..someone on crack? :)
  
  
http://cvs.php.net/diff.php/ZendEngine2/zend.h?r1=1.268r2=1.269ty=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.268 ZendEngine2/zend.h:1.269
--- ZendEngine2/zend.h:1.268Mon Jan 10 16:57:30 2005
+++ ZendEngine2/zend.h  Wed Jan 19 21:02:08 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.h,v 1.268 2005/01/10 21:57:30 rasmus Exp $ */
+/* $Id: zend.h,v 1.269 2005/01/20 02:02:08 sniper Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
@@ -377,7 +377,7 @@
 #define MAX(a, b)  (((a)(b))?(a):(b))
 #define MIN(a, b)  (((a)(b))?(a):(b))
 #define ZEND_STRL(str) (str), (sizeof(str)-1)
-#define ZEND_STRS(str) (str), (sizeof(str)-1)
+#define ZEND_STRS(str) (str), (sizeof(str))
 #define ZEND_NORMALIZE_BOOL(n) \
((n) ? (((n)0) ? 1 : -1) : 0)
 #define ZEND_TRUTH(x)  ((x) ? 1 : 0)
http://cvs.php.net/diff.php/ZendEngine2/zend_constants.c?r1=1.69r2=1.70ty=u
Index: ZendEngine2/zend_constants.c
diff -u ZendEngine2/zend_constants.c:1.69 ZendEngine2/zend_constants.c:1.70
--- ZendEngine2/zend_constants.c:1.69   Tue Jul 13 15:22:11 2004
+++ ZendEngine2/zend_constants.cWed Jan 19 21:02:08 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_constants.c,v 1.69 2004/07/13 19:22:11 helly Exp $ */
+/* $Id: zend_constants.c,v 1.70 2005/01/20 02:02:08 sniper Exp $ */
 
 #include zend.h
 #include zend_constants.h
@@ -116,25 +116,25 @@
c.flags = CONST_PERSISTENT;
c.module_number = 0;
 
-   c.name = zend_strndup(ZEND_STRS(TRUE));
+   c.name = zend_strndup(ZEND_STRL(TRUE));
c.name_len = sizeof(TRUE);
c.value.value.lval = 1;
c.value.type = IS_BOOL;
zend_register_constant(c TSRMLS_CC);

-   c.name = zend_strndup(ZEND_STRS(FALSE));
+   c.name = zend_strndup(ZEND_STRL(FALSE));
c.name_len = sizeof(FALSE);
c.value.value.lval = 0;
c.value.type = IS_BOOL;
zend_register_constant(c TSRMLS_CC);
 
-   c.name = zend_strndup(ZEND_STRS(ZEND_THREAD_SAFE));
+   c.name = zend_strndup(ZEND_STRL(ZEND_THREAD_SAFE));
c.name_len = sizeof(ZEND_THREAD_SAFE);
c.value.value.lval = ZTS_V;
c.value.type = IS_BOOL;
zend_register_constant(c TSRMLS_CC);
 
-   c.name = zend_strndup(ZEND_STRS(NULL));
+   c.name = zend_strndup(ZEND_STRL(NULL));
c.name_len = sizeof(NULL);
c.value.type = IS_NULL;
zend_register_constant(c TSRMLS_CC);
http://cvs.php.net/diff.php/php-src/ext/ncurses/ncurses_functions.c?r1=1.45r2=1.46ty=u
Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.45 
php-src/ext/ncurses/ncurses_functions.c:1.46
--- php-src/ext/ncurses/ncurses_functions.c:1.45Thu Jan  8 03:16:27 2004
+++ php-src/ext/ncurses/ncurses_functions.c Wed Jan 19 21:02:09 2005
@@ -149,7 +149,7 @@
c.value = *zscr;
zval_copy_ctor(c.value);
c.flags = CONST_CS;
-   c.name = zend_strndup(ZEND_STRS(STDSCR));
+   c.name = zend_strndup(ZEND_STRL(STDSCR));
c.name_len = sizeof(STDSCR);
zend_register_constant(c TSRMLS_CC);
 
@@ -162,7 +162,7 @@
c.value = *zscr;\
zval_copy_ctor(c.value);   \
c.flags = CONST_CS; \
-   c.name = zend_strndup(ZEND_STRS(NCURSES_ #x)); \
+   c.name = zend_strndup(ZEND_STRL(NCURSES_ #x)); \
c.name_len = sizeof(NCURSES_ #x);   \
zend_register_constant(c TSRMLS_CC)

http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.115r2=1.116ty=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.115 php-src/sapi/cli/php_cli.c:1.116
--- php-src/sapi/cli/php_cli.c:1.115Mon Dec 20 14:33:38 2004
+++ php-src/sapi/cli/php_cli.c  Wed Jan 19 21:02:09 2005
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.115 2004/12/20 19:33:38 rasmus Exp $ */
+/* $Id: php_cli.c,v 1.116 2005/01/20 02:02:09 sniper Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -455,21 +455,21 @@

ic.value = *zin;

Re: [PHP-CVS] cvs: php-src /ext/ncurses ncurses_functions.c /sapi/cli php_cli.c ZendEngine2 zend.h zend_constants.c

2005-01-19 Thread Andi Gutmans
How/when did that happen?
Andi
At 02:02 AM 1/20/2005 +, Jani Taskinen wrote:
sniper  Wed Jan 19 21:02:09 2005 EDT
  Modified files:
/ZendEngine2zend.h zend_constants.c
/php-src/ext/ncursesncurses_functions.c
/php-src/sapi/cli   php_cli.c
  Log:
  - Revert the weird change of ZEND_STRS() macro and use the correct
ZEND_STRL() macro.
  # ZEND_STRS was changed to be same as ZEND_STRL..someone on crack? :)
http://cvs.php.net/diff.php/ZendEngine2/zend.h?r1=1.268r2=1.269ty=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.268 ZendEngine2/zend.h:1.269
--- ZendEngine2/zend.h:1.268Mon Jan 10 16:57:30 2005
+++ ZendEngine2/zend.h  Wed Jan 19 21:02:08 2005
@@ -17,7 +17,7 @@
+--+
 */
-/* $Id: zend.h,v 1.268 2005/01/10 21:57:30 rasmus Exp $ */
+/* $Id: zend.h,v 1.269 2005/01/20 02:02:08 sniper Exp $ */
 #ifndef ZEND_H
 #define ZEND_H
@@ -377,7 +377,7 @@
 #define MAX(a, b)  (((a)(b))?(a):(b))
 #define MIN(a, b)  (((a)(b))?(a):(b))
 #define ZEND_STRL(str) (str), (sizeof(str)-1)
-#define ZEND_STRS(str) (str), (sizeof(str)-1)
+#define ZEND_STRS(str) (str), (sizeof(str))
 #define ZEND_NORMALIZE_BOOL(n) \
((n) ? (((n)0) ? 1 : -1) : 0)
 #define ZEND_TRUTH(x)  ((x) ? 1 : 0)
http://cvs.php.net/diff.php/ZendEngine2/zend_constants.c?r1=1.69r2=1.70ty=u
Index: ZendEngine2/zend_constants.c
diff -u ZendEngine2/zend_constants.c:1.69 ZendEngine2/zend_constants.c:1.70
--- ZendEngine2/zend_constants.c:1.69   Tue Jul 13 15:22:11 2004
+++ ZendEngine2/zend_constants.cWed Jan 19 21:02:08 2005
@@ -17,7 +17,7 @@
+--+
 */
-/* $Id: zend_constants.c,v 1.69 2004/07/13 19:22:11 helly Exp $ */
+/* $Id: zend_constants.c,v 1.70 2005/01/20 02:02:08 sniper Exp $ */
 #include zend.h
 #include zend_constants.h
@@ -116,25 +116,25 @@
c.flags = CONST_PERSISTENT;
c.module_number = 0;
-   c.name = zend_strndup(ZEND_STRS(TRUE));
+   c.name = zend_strndup(ZEND_STRL(TRUE));
c.name_len = sizeof(TRUE);
c.value.value.lval = 1;
c.value.type = IS_BOOL;
zend_register_constant(c TSRMLS_CC);
-   c.name = zend_strndup(ZEND_STRS(FALSE));
+   c.name = zend_strndup(ZEND_STRL(FALSE));
c.name_len = sizeof(FALSE);
c.value.value.lval = 0;
c.value.type = IS_BOOL;
zend_register_constant(c TSRMLS_CC);
-   c.name = zend_strndup(ZEND_STRS(ZEND_THREAD_SAFE));
+   c.name = zend_strndup(ZEND_STRL(ZEND_THREAD_SAFE));
c.name_len = sizeof(ZEND_THREAD_SAFE);
c.value.value.lval = ZTS_V;
c.value.type = IS_BOOL;
zend_register_constant(c TSRMLS_CC);
-   c.name = zend_strndup(ZEND_STRS(NULL));
+   c.name = zend_strndup(ZEND_STRL(NULL));
c.name_len = sizeof(NULL);
c.value.type = IS_NULL;
zend_register_constant(c TSRMLS_CC);
http://cvs.php.net/diff.php/php-src/ext/ncurses/ncurses_functions.c?r1=1.45r2=1.46ty=u
Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.45 
php-src/ext/ncurses/ncurses_functions.c:1.46
--- php-src/ext/ncurses/ncurses_functions.c:1.45Thu Jan  8 
03:16:27 2004
+++ php-src/ext/ncurses/ncurses_functions.c Wed Jan 19 21:02:09 2005
@@ -149,7 +149,7 @@
c.value = *zscr;
zval_copy_ctor(c.value);
c.flags = CONST_CS;
-   c.name = zend_strndup(ZEND_STRS(STDSCR));
+   c.name = zend_strndup(ZEND_STRL(STDSCR));
c.name_len = sizeof(STDSCR);
zend_register_constant(c TSRMLS_CC);

@@ -162,7 +162,7 @@
c.value = *zscr;\
zval_copy_ctor(c.value);   \
c.flags = CONST_CS; \
-   c.name = zend_strndup(ZEND_STRS(NCURSES_ #x)); \
+   c.name = zend_strndup(ZEND_STRL(NCURSES_ #x)); \
c.name_len = sizeof(NCURSES_ 
#x);   \
zend_register_constant(c TSRMLS_CC)

http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli.c?r1=1.115r2=1.116ty=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.115 php-src/sapi/cli/php_cli.c:1.116
--- php-src/sapi/cli/php_cli.c:1.115Mon Dec 20 14:33:38 2004
+++ php-src/sapi/cli/php_cli.c  Wed Jan 19 21:02:09 2005
@@ -19,7 +19,7 @@
+--+
 */
-/* $Id: php_cli.c,v 1.115 2004/12/20 19:33:38 rasmus Exp $ */
+/* $Id: php_cli.c,v 1.116 2005/01/20 02:02:09 sniper Exp $ */
 #include php.h
 #include php_globals.h
@@ -455,21 +455,21 @@
ic.value = *zin;
ic.flags = 

[PHP-CVS] cvs: php-src /ext/ncurses ncurses_functions.c

2003-12-21 Thread Ilia Alshanetsky
iliaa   Sun Dec 21 13:46:15 2003 EDT

  Modified files:  
/php-src/ext/ncursesncurses_functions.c 
  Log:
  Corrected argument parsing.
  
  
Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.43 
php-src/ext/ncurses/ncurses_functions.c:1.44
--- php-src/ext/ncurses/ncurses_functions.c:1.43Thu Dec 11 19:23:15 2003
+++ php-src/ext/ncurses/ncurses_functions.c Sun Dec 21 13:46:15 2003
@@ -1404,7 +1404,7 @@
 {
long y,x;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, lls, y, x) == 
FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ll, y, x) == FAILURE) 
{
return;
}
IS_NCURSES_INITIALIZED();   
@@ -1419,7 +1419,7 @@
 {
long y,x;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, lls, y, x) == 
FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ll, y, x) == FAILURE) 
{
return;
}
IS_NCURSES_INITIALIZED();   
@@ -1433,7 +1433,7 @@
 {
long y,x;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, lls, y, x) == 
FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ll, y, x) == FAILURE) 
{
return;
}
IS_NCURSES_INITIALIZED();

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/ncurses ncurses_functions.c

2003-12-11 Thread Ilia Alshanetsky
iliaa   Thu Dec 11 19:23:15 2003 EDT

  Modified files:  
/php-src/ext/ncursesncurses_functions.c 
  Log:
  Fixed extra byte allocation in constant creation code.
  
  
Index: php-src/ext/ncurses/ncurses_functions.c
diff -u php-src/ext/ncurses/ncurses_functions.c:1.42 
php-src/ext/ncurses/ncurses_functions.c:1.43
--- php-src/ext/ncurses/ncurses_functions.c:1.42Mon Jun 16 12:36:41 2003
+++ php-src/ext/ncurses/ncurses_functions.c Thu Dec 11 19:23:15 2003
@@ -149,8 +149,8 @@
c.value = *zscr;
zval_copy_ctor(c.value);
c.flags = CONST_CS;
-   c.name = zend_strndup(STDSCR, 7);
-   c.name_len = 7;
+   c.name = zend_strndup(ZEND_STRS(STDSCR));
+   c.name_len = sizeof(STDSCR);
zend_register_constant(c TSRMLS_CC);
 
/* we need this interesting arrangement because the
@@ -162,7 +162,7 @@
c.value = *zscr;\
zval_copy_ctor(c.value);   \
c.flags = CONST_CS; \
-   c.name = zend_strndup(NCURSES_ #x, sizeof(NCURSES_ #x)); \
+   c.name = zend_strndup(ZEND_STRS(NCURSES_ #x)); \
c.name_len = sizeof(NCURSES_ #x);   \
zend_register_constant(c TSRMLS_CC)


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php