zend_symtable_update_ind(ht, Z_STR_P(offset), value);
return;
case IS_DOUBLE:
- index = (long)Z_DVAL_P(offset);
+ index = (php_int_t)Z_DVAL_P(offset);
goto num_index;
case IS_RESOURCE:
index = Z_RES_HANDLE_P(offset);
Set maximum line length */
SPL_METHOD(SplFileObject, setMaxLineLen)
{
- long max_len;
+ php_int_t max_len;
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis());
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &max_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &max_len) == FAILURE) {
return;
}
SPL_METHOD(SplFileObject, fread)
{
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis());
- long length = 0;
+ php_int_t length = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &length) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &length) == FAILURE) {
return;
}
error:
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
- zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Error at offset %ld of %d bytes", (long)((char*)p - buf), buf_len);
+ zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Error at offset %pd of %d bytes", (php_int_t)((char*)p - buf), buf_len);
return;
} /* }}} */
}
/* }}} */
-static int spl_heap_object_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */
+static int spl_heap_object_count_elements(zval *object, php_int_t *count TSRMLS_DC) /* {{{ */
{
spl_heap_object *intern = Z_SPLHEAP_P(object);
zval_ptr_dtor(&intern->retval);
ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
convert_to_int(&intern->retval);
- *count = (long) Z_IVAL(intern->retval);
+ *count = (php_int_t) Z_IVAL(intern->retval);
return SUCCESS;
}
*count = 0;