Changes between Initial Version and Version 1 of Ticket #3412


Ignore:
Timestamp:
Mar 29, 2010, 6:51:26 AM (14 years ago)
Author:
warmerdam
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3412 – Description

    initial v1  
    11I am seeing a value of zero for width in the code when the setSize() function below is called:
    2 
     2{{{
    33<?
    44dl('php_mapscript.so');
     
    99$img->saveImage("");
    1010?>
     11}}}
    1112
    1213It turns out this is because width and height are declared as integers in zim_mapObj_setSize(), but the "l" specifier in zend_parse_parameters expects a pointer to a long.  On 32bit systems these are generally the same, but on 64bit systems (with the exception of Win64) a long and an int are different sizes resulting in various sorts of problems.  The fix is to declare the variables as long instead of int.  Skimming the rest of the php bindings this problem appears to be endemic.