[Vm-dev] Cross file updates
tim Rowledge
tim at rowledge.org
Thu Mar 7 22:26:48 UTC 2013
On 06-03-2013, at 10:59 PM, Ian Piumarta <piumarta at speakeasy.net> wrote:
>
>> 4.4-ish HostWindowPlugin.h had 'unsigned char *' until I changed it. Unix uses 'unsigned char *', windows now uses 'unsigned char *', Mac now uses 'unsigned char *' and RISC OS still uses 'unsigned *'.
>
> Then everything was in agreement except ROS, which was using 'unsigned int *' and should be changed to conform.
I'm entirely content to make the RISC OS code conform to everyone else's usage - but it does require a minor change to the plugin code; the 'dispBits' var in primitiveShowHostWindowRect is specified as WordArray which generates as (unsigned *)(foo). Clearly it is an error to pass an unsigned * to a function specified to take an unsigned char *.
Changing to ByteArray generates dispBits as (char *) - and here I'll note the
self var: #dispBits type: 'unsigned char * '.
in the method as having no effect whatsoever - which is better but still strictly an error vs unsigned char *.
At least, that is the viewpoint encoded into NorCroft C and I'm not about to debate C syntax with Prof. Alan Mycroft. Anyone that wishes to do so can find contact information at http://www.codemist.co.uk/ncc/index.html
I *can* suppress all implicit cast errors and make it compile but really I don't like that much. Errors are reported for a reason.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Cloister: a pretentious clam
More information about the Vm-dev
mailing list