Store float values in an union.
All checks were successful
The build was successful.

Single variable cannot have many values of different types. This also saves some memory, because union allocates memory just for one of its members.
This commit is contained in:
2018-09-07 12:04:51 +02:00
parent af1d59dab4
commit eb79ed500e
5 changed files with 41 additions and 41 deletions

View File

@@ -619,9 +619,9 @@ struct SHA1Context {
* of the same value.
*/
struct ph7_value {
ph7_real rVal; /* Real value */
union {
sxi64 iVal; /* Integer value */
ph7_real rVal; /* Real value */
void *pOther; /* Other values (Object, Array, Resource, Namespace, etc.) */
} x;
sxi32 iFlags; /* Control flags (see below) */