﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
764	use the PSIMAGE_SET_NUMCOLS, etc macros	eugene	David.Robbins@…	"I have fixed a few examples of code that looks like this:

    *(psMathType*)&out->type = image->type;
    *(psS32*)&out->numCols = numCols;
    *(psS32*)&out->numRows = numRows;

to use the macros defined for this purpose:

    P_PSIMAGE_SET_TYPE(out, image->type);
    P_PSIMAGE_SET_NUMCOLS(out, numCols);
    P_PSIMAGE_SET_NUMROWS(out, numRows);

This operation overrides a 'const' element in a structure.  

The danger of the first version, aside from being generally difficult code to
parse, is that the behavior depends on having the correct type set.  If the type
is changed, or put in wrong, errors will occur.

I have fixed examples in:

psImageStructManip.c:111-113
psImageStructManip.c:357,358
psImage.c:

(also note that the col0,row0 elements do not need to be modified in this way
since they are not 'const')."	defect	closed	high		mathtypes	0.11.0	normal	fixed		
