}
-PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, time_t expires, char *path, int path_len, char *domain, int domain_len, int secure, int url_encode, int httponly TSRMLS_DC)
+PHPAPI int php_setcookie(char *name, size_t name_len, char *value, size_t value_len, time_t expires, char *path, size_t path_len, char *domain, size_t domain_len, int secure, int url_encode, int httponly TSRMLS_DC)
{
char *cookie;
- int len=sizeof("Set-Cookie: ");
+ size_t len=sizeof("Set-Cookie: ");
zend_string *dt;
sapi_header_line ctr = {0};
int result;
}
ctr.line = cookie;
- ctr.line_len = strlen(cookie);
+ ctr.line_len = (uint)strlen(cookie);
result = sapi_header_op(SAPI_HEADER_ADD, &ctr TSRMLS_CC);
efree(cookie);
zend_long old_response_code;
old_response_code = SG(sapi_headers).http_response_code;
- SG(sapi_headers).http_response_code = response_code;
+ SG(sapi_headers).http_response_code = (int)response_code;
if (old_response_code) {
RETURN_LONG(old_response_code);
PHP_FUNCTION(http_response_code);
PHPAPI int php_header(TSRMLS_D);
-PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, time_t expires, char *path, int path_len, char *domain, int domain_len, int secure, int url_encode, int httponly TSRMLS_DC);
+PHPAPI int php_setcookie(char *name, size_t name_len, char *value, size_t value_len, time_t expires, char *path, size_t path_len, char *domain, size_t domain_len, int secure, int url_encode, int httponly TSRMLS_DC);
#endif
/* {{{ php_replace_controlchars
*/
-PHPAPI char *php_replace_controlchars_ex(char *str, int len)
+PHPAPI char *php_replace_controlchars_ex(char *str, size_t len)
{
unsigned char *s = (unsigned char *)str;
unsigned char *e = (unsigned char *)str + len;
/* {{{ php_url_parse
*/
-PHPAPI php_url *php_url_parse_ex(char const *str, int length)
+PHPAPI php_url *php_url_parse_ex(char const *str, size_t length)
{
char port_buf[6];
php_url *ret = ecalloc(1, sizeof(php_url));
/* {{{ php_url_encode
*/
-PHPAPI zend_string *php_url_encode(char const *s, int len)
+PHPAPI zend_string *php_url_encode(char const *s, size_t len)
{
register unsigned char c;
unsigned char *to;
/* {{{ php_url_decode
*/
-PHPAPI int php_url_decode(char *str, int len)
+PHPAPI size_t php_url_decode(char *str, size_t len)
{
char *dest = str;
char *data = str;
/* {{{ php_raw_url_encode
*/
-PHPAPI zend_string *php_raw_url_encode(char const *s, int len)
+PHPAPI zend_string *php_raw_url_encode(char const *s, size_t len)
{
register int x, y;
zend_string *str;
/* {{{ php_raw_url_decode
*/
-PHPAPI int php_raw_url_decode(char *str, int len)
+PHPAPI size_t php_raw_url_decode(char *str, size_t len)
{
char *dest = str;
char *data = str;
PHPAPI void php_url_free(php_url *theurl);
PHPAPI php_url *php_url_parse(char const *str);
-PHPAPI php_url *php_url_parse_ex(char const *str, int length);
-PHPAPI int php_url_decode(char *str, int len); /* return value: length of decoded string */
-PHPAPI int php_raw_url_decode(char *str, int len); /* return value: length of decoded string */
-PHPAPI zend_string *php_url_encode(char const *s, int len);
-PHPAPI zend_string *php_raw_url_encode(char const *s, int len);
+PHPAPI php_url *php_url_parse_ex(char const *str, size_t length);
+PHPAPI size_t php_url_decode(char *str, size_t len); /* return value: length of decoded string */
+PHPAPI size_t php_raw_url_decode(char *str, size_t len); /* return value: length of decoded string */
+PHPAPI zend_string *php_url_encode(char const *s, size_t len);
+PHPAPI zend_string *php_raw_url_encode(char const *s, size_t len);
+PHPAPI char *php_replace_controlchars_ex(char *str, size_t len);
PHP_FUNCTION(parse_url);
PHP_FUNCTION(urlencode);