[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ string.c

2009-08-15 Thread Felipe Pena
felipe   Sat, 15 Aug 2009 16:05:06 +

Revision: http://svn.php.net/viewvc?view=revision&revision=287340

Log:
- Fix ZTS build && removed unused vars

Changed paths:
U   php/php-src/trunk/ext/standard/string.c

Modified: php/php-src/trunk/ext/standard/string.c
===
--- php/php-src/trunk/ext/standard/string.c 2009-08-15 15:29:01 UTC (rev 
287339)
+++ php/php-src/trunk/ext/standard/string.c 2009-08-15 16:05:06 UTC (rev 
287340)
@@ -2322,7 +2322,7 @@

 /* {{{ php_needle_char
  */
-static long php_needle_char(zval *needle)
+static long php_needle_char(zval *needle TSRMLS_DC)
 {
switch (Z_TYPE_P(needle)) {
case IS_LONG:
@@ -2351,7 +2351,7 @@
 }
 /* }}} */

-static zstr php_needle_to_type(zval **needle, zend_uchar haystack_type, int 
*target_len, char *char_buf, UChar *uchar_buf)
+static zstr php_needle_to_type(zval **needle, zend_uchar haystack_type, int 
*target_len, char *char_buf, UChar *uchar_buf TSRMLS_DC)
 {
zstr target;

@@ -2367,7 +2367,7 @@
target = Z_UNIVAL_PP(needle);
*target_len = Z_UNILEN_PP(needle);
} else {
-   long needleval = php_needle_char(*needle);
+   long needleval = php_needle_char(*needle TSRMLS_CC);
if(needleval == -1) {
return target;
}
@@ -2409,7 +2409,7 @@
return;
}

-   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char);
+   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char TSRMLS_CC);

if(target.v == NULL) {
RETURN_FALSE;
@@ -2465,7 +2465,7 @@
return;
}

-   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char);
+   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char TSRMLS_CC);

if(target.v == NULL) {
RETURN_FALSE;
@@ -2548,7 +2548,7 @@
RETURN_FALSE;
}

-   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char);
+   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char TSRMLS_CC);

if(target.v == NULL) {
RETURN_FALSE;
@@ -2596,7 +2596,6 @@
void *found = NULL;
long offset = 0;
char *haystack_dup = NULL, *needle_dup = NULL;
-   char c = 0;
int cu_offset = 0;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "tZ|l", &haystack, 
&haystack_len, &haystack_type, &needle, &offset) == FAILURE) {
@@ -2617,7 +2616,7 @@
RETURN_FALSE;
}

-   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char);
+   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char TSRMLS_CC);

if(target.v == NULL) {
RETURN_FALSE;
@@ -2669,7 +2668,6 @@
zval **needle;
char needle_char[2];
UChar u_needle_char[3];
-   void *found = NULL;
long offset = 0;
char *p, *e;
UChar *pos, *u_p, *u_e;
@@ -2679,7 +2677,7 @@
return;
}

-   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char);
+   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char TSRMLS_CC);

if(target.v == NULL) {
RETURN_FALSE;
@@ -2783,7 +2781,6 @@
zval **needle;
char needle_char[2];
UChar u_needle_char[3];
-   void *found = NULL;
long offset = 0;
char *p, *e;
UChar *u_p, *u_e, *pos;
@@ -2794,7 +2791,7 @@
RETURN_FALSE;
}

-   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char);
+   target = php_needle_to_type(needle, haystack_type, &needle_len, 
needle_char, u_needle_char TSRMLS_CC);

if(target.v == NULL) {
RETURN_FALSE;
@@ -2950,7 +2947,7 @@
found = zend_memrchr(haystack.s, *Z_STRVAL_PP(needle), 
haystack_len);
}
} else {
-   long needleval = php_needle_char(*needle);
+   long needleval = php_needle_char(*needle TSRMLS_CC);
if(needleval == -1) {
RETURN_FALSE;
}

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

[PHP-CVS] svn: /php/php-src/trunk/ext/ldap/ ldap.c

2009-08-15 Thread Felipe Pena
felipe   Sat, 15 Aug 2009 14:46:34 +

Revision: http://svn.php.net/viewvc?view=revision&revision=287334

Log:
- Add check

Changed paths:
U   php/php-src/trunk/ext/ldap/ldap.c

Modified: php/php-src/trunk/ext/ldap/ldap.c
===
--- php/php-src/trunk/ext/ldap/ldap.c   2009-08-15 14:41:22 UTC (rev 287333)
+++ php/php-src/trunk/ext/ldap/ldap.c   2009-08-15 14:46:34 UTC (rev 287334)
@@ -802,7 +802,7 @@
if (ldap_attrs != NULL) {
efree(ldap_attrs);
}
-   if (Z_TYPE_P(base_dn) == IS_UNICODE) {
+   if (Z_TYPE_P(base_dn) == IS_UNICODE && ldap_base_dn) {
efree(ldap_base_dn);
}
if (!ret) {

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

Re: [PHP-CVS] svn: /SVNROOT/ pear_avail

2009-08-15 Thread Christian Weiske
Hi Hannes,


> > give bishop avail to net_sms. not as cool as giving jesus karma for
> > php-src, but nearly
> He does have karma for php-src already :)
Yes. My message was a reference to
http://zmievski.org/2006/01/he-saves-but-does-he-commit

> >    U   SVNROOT/pear_avail
> But, didn't these mails used to go to pear-...@?

They used to when we had cvs.

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-= Geeking around in the name of science since 1982 =-


signature.asc
Description: PGP signature


Re: [PHP-CVS] svn: /SVNROOT/ pear_avail

2009-08-15 Thread Hannes Magnusson
On Sat, Aug 15, 2009 at 09:34, Christian Weiske wrote:
> cweiske                                  Sat, 15 Aug 2009 07:34:37 +
>
> Revision: http://svn.php.net/viewvc?view=revision&revision=287314
>
> Log:
> give bishop avail to net_sms. not as cool as giving jesus karma for php-src, 
> but nearly


He does have karma for php-src already :)


> Changed paths:
>    U   SVNROOT/pear_avail


But, didn't these mails used to go to pear-...@?

-Hannes

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



Re: [PHP-CVS] svn: /php/php-src/trunk/ext/standard/ string.c tests/strings/str_replace.phpt tests/strings/stripos.phpt tests/strings/stripos_variation1.phpt tests/strings/stripos_variation10.phpt t

2009-08-15 Thread Hannes Magnusson
On Sat, Aug 15, 2009 at 07:43, Stanislav Malyshev wrote:
> stas                                     Sat, 15 Aug 2009 05:43:18 +
>
> Revision: http://svn.php.net/viewvc?view=revision&revision=287313
>
> Log:
> cleanup string parameter parsing, fix some tests
>
> Changed paths:
>    U   php/php-src/trunk/ext/standard/string.c

+static long php_needle_char(zval *needle)
 {
[...]
+   default: {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "needle is 
not a
string or an integer");

you are missing TSRMLS_DC

-Hannes

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



[PHP-CVS] svn: /SVNROOT/ pear_avail

2009-08-15 Thread Christian Weiske
cweiske  Sat, 15 Aug 2009 07:34:37 +

Revision: http://svn.php.net/viewvc?view=revision&revision=287314

Log:
give bishop avail to net_sms. not as cool as giving jesus karma for php-src, 
but nearly

Changed paths:
U   SVNROOT/pear_avail

Modified: SVNROOT/pear_avail
===
--- SVNROOT/pear_avail  2009-08-15 05:43:18 UTC (rev 287313)
+++ SVNROOT/pear_avail  2009-08-15 07:34:37 UTC (rev 287314)
@@ -174,6 +174,7 @@
 avail|hschletz|pear/packages/MDB2
 avail|tacker|pear/packages/File_Bittorrent,pear/packages/File_Bittorrent2
 avail|mrook|pear/packages/VersionControl_SVN,pear/packages/Archive_Tar
+avail|bishop|pear/packages/Net_SMS

 # But members of the PHP Group get access to everything.
 # Note: This line MUST be at the end so that it overrides any unavail settings

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