/* {{{ 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:
}
/* }}} */
-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;
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;
}
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;
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;
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;
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) {
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;
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;
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;
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;
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;
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;
}