extern ZEND_API zstr null_zstr;
extern ZEND_API zstr empty_zstr;
+/* TODO: get rid of this inline as well or figure out a way to deal with:
+ Zend\zend_hash.c(343) : warning C4090: 'function' : different 'const' qualifiers */
static inline zstr _to_zstr(void *v) {
zstr ret;
ret.v = v;
/* T->str_offset.str here is always IS_STRING or IS_UNICODE */
if (Z_TYPE_P(T->str_offset.str) == IS_STRING) {
if (((int)T->str_offset.offset<0)
- || (Z_STRLEN_P(T->str_offset.str) <= T->str_offset.offset)) {
+ || ((unsigned int)Z_STRLEN_P(T->str_offset.str) <= T->str_offset.offset)) {
Z_STRVAL_P(ptr) = STR_EMPTY_ALLOC();
Z_STRLEN_P(ptr) = 0;
} else {
Z_TYPE_P(ptr) = IS_STRING;
} else {
if (((int)T->str_offset.offset<0)
- || (Z_USTRCPLEN_P(T->str_offset.str) <= T->str_offset.offset)) {
+ || ((unsigned int)Z_USTRCPLEN_P(T->str_offset.str) <= T->str_offset.offset)) {
Z_USTRVAL_P(ptr) = USTR_MAKE("");
Z_USTRLEN_P(ptr) = 0;
} else {
return 0;
}
- if (T->str_offset.offset >= Z_STRLEN_P(T->str_offset.str)) {
+ if (T->str_offset.offset >= (unsigned int)Z_STRLEN_P(T->str_offset.str)) {
Z_STRVAL_P(T->str_offset.str) = (char *) erealloc(Z_STRVAL_P(T->str_offset.str), T->str_offset.offset+1+1);
memset(Z_STRVAL_P(T->str_offset.str) + Z_STRLEN_P(T->str_offset.str),
' ',
return 0;
}
- if (T->str_offset.offset >= Z_USTRLEN_P(T->str_offset.str)) {
+ if (T->str_offset.offset >= (unsigned int)Z_USTRLEN_P(T->str_offset.str)) {
Z_USTRVAL_P(T->str_offset.str) = (UChar *) eurealloc(Z_USTRVAL_P(T->str_offset.str), T->str_offset.offset+1+1);
u_memset(Z_USTRVAL_P(T->str_offset.str) + Z_USTRLEN_P(T->str_offset.str),
' ',
}
}
- ZEND_VM_STACK_GROW_IF_NEEDED(fci->param_count + 1);
+ ZEND_VM_STACK_GROW_IF_NEEDED((int)(fci->param_count + 1));
for (i=0; i<fci->param_count; i++) {
zval *param;
ex->CVs[ex->op_array->this_var] = (zval**)ex->CVs + ex->op_array->last_var + ex->op_array->this_var;
*ex->CVs[ex->op_array->this_var] = EG(This);
}
- for (i = 0; i < ex->op_array->last_var; i++) {
+ for (i = 0; i < (zend_uint) ex->op_array->last_var; i++) {
if (ex->CVs[i]) {
zend_u_hash_quick_update(EG(active_symbol_table),
type,
#define zendtext LANG_SCNG(yy_text)
#define zendleng LANG_SCNG(yy_leng)
-static void handle_whitespace(int *emit_whitespace) /* {{{ */
+static void handle_whitespace(unsigned int *emit_whitespace) /* {{{ */
{
unsigned char c;
- int i;
+ unsigned int i;
for (c=0; c<128; c++) {
if (emit_whitespace[c]>0) {
zval token;
int token_type;
int in_string=0;
- int nest_level=0;
- int emit_whitespace[256];
- int i;
+ unsigned int nest_level=0;
+ unsigned int emit_whitespace[256];
+ unsigned int i;
TSRMLS_FETCH();
memset(emit_whitespace, 0, sizeof(int)*256);
-/* Generated by re2c 0.13.5 on Tue May 19 08:46:59 2009 */
+/* Generated by re2c 0.13.5 on Wed Jun 03 09:59:17 2009 */
#line 1 "Zend/zend_ini_scanner.l"
/*
+----------------------------------------------------------------------+
-/* Generated by re2c 0.13.5 on Tue May 19 08:46:59 2009 */
+/* Generated by re2c 0.13.5 on Wed Jun 03 09:59:17 2009 */
#line 3 "Zend/zend_ini_scanner_defs.h"
enum YYCONDTYPE {
/* {{{ zend_implement_aggregate */
static int zend_implement_aggregate(zend_class_entry *interface, zend_class_entry *class_type TSRMLS_DC)
{
- int i, t = -1;
+ unsigned int i;
+ int t = -1;
if (class_type->get_iterator) {
if (class_type->type == ZEND_INTERNAL_CLASS) {
-/* Generated by re2c 0.13.5 on Mon May 25 10:34:14 2009 */
+/* Generated by re2c 0.13.5 on Wed Jun 03 09:59:17 2009 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
-/* Generated by re2c 0.13.5 on Mon May 04 20:02:45 2009 */
+/* Generated by re2c 0.13.5 on Wed Jun 03 09:59:17 2009 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
memset(file_handle->handle.stream.mmap.buf + file_handle->handle.stream.mmap.len, 0, ZEND_MMAP_AHEAD);
}
+#if HAVE_MMAP
return_mapped:
+#endif
file_handle->type = ZEND_HANDLE_MAPPED;
file_handle->handle.stream.mmap.pos = 0;
file_handle->handle.stream.mmap.old_handle = file_handle->handle.stream.handle;
/* return value is only used as a simple string, so mis-aligned parts
* inside the Bigint are not at risk on strict align architectures
*/
-static char * rv_alloc(int i) /* {{{ */
+static char * rv_alloc(unsigned int i) /* {{{ */
{
- int j, k, *r;
+ unsigned int k;
+ int j, *r;
j = sizeof(ULong);
for(k = 0;
#include <unicode/utypes.h>
#include <unicode/uchar.h>
+/* Disable false positive warning about LONG_MIN, we could use INT_MIN but requires
+ too much code changes for no gain. */
+#ifdef PHP_WIN32
+# pragma warning (disable:4146)
+#endif
+
/* long zend_u_strtol (const UChar *nptr, UChar **endptr, int base) {{{
* Convert a Unicode string to a long integer.
*
static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op);
+#ifdef PHP_WIN32
+#pragma warning (disable:4101)
+#endif
#define ZEND_VM_CONTINUE() return 0
#define ZEND_VM_RETURN() return 1
for (i=0; i<EX(op_array)->last_brk_cont; i++) {
if (EX(op_array)->brk_cont_array[i].start < 0) {
continue;
- } else if (EX(op_array)->brk_cont_array[i].start > op_num) {
+ } else if ((zend_uint)EX(op_array)->brk_cont_array[i].start > op_num) {
/* further blocks will not be relevant... */
break;
- } else if (op_num < EX(op_array)->brk_cont_array[i].brk) {
+ } else if (op_num < (zend_uint)EX(op_array)->brk_cont_array[i].brk) {
if (!catched ||
- catch_op_num >= EX(op_array)->brk_cont_array[i].brk) {
+ catch_op_num >= (zend_uint)EX(op_array)->brk_cont_array[i].brk) {
zend_op *brk_opline = &EX(op_array)->opcodes[EX(op_array)->brk_cont_array[i].brk];
switch (brk_opline->opcode) {
static int ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_error_noreturn(E_ERROR, "Invalid opcode %d/%d/%d.", EX(opline)->opcode, EX(opline)->op1.op_type, EX(opline)->op2.op_type);
+ return 0;
}