Re: [PHP-DEV] Simple question

2003-06-30 Thread Andrey Hristov
Oriol, try valgrind (aka memory checker) and you will hopefully find where your problem resides Andrey - Original Message - From: "Oriol" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 30, 2003 7:13 PM Subject: [PHP-DEV] Simple question > &

[PHP-DEV] Simple question

2003-06-30 Thread Oriol
Hello! I'm trying to write a trim function which expects a zval* of type string, as follows: int zstrtrim(zval *z) { char *ptr1 = Z_STRVAL_P(z), *ptr2; if (Z_STRLEN_P(z) == 0) return; ptr2 = &ptr1[Z_STRLEN_P(z)-1]; while (*ptr1 != 0) { if (*ptr1 > ' ') break;