[GRASS5] dbCatVal

Is it harmless (for binary compatibility) to change

typedef struct {
    int cat; /* category */
    int isNull;
    union {
        int i;
        double d;
    } val;
} dbCatVal;

to

typedef struct {
    int cat; /* category */
    int isNull;
    union {
        int i;
        double d;
        dbString *s;
        dbDateTime *t;
    } val;
} dbCatVal;

?

Pointers should not take > 8 bytes (double) I believe.

Radim

Radim Blazek wrote:

Is it harmless (for binary compatibility) to change

typedef struct {
    int cat; /* category */
    int isNull;
    union {
        int i;
        double d;
    } val;
} dbCatVal;

to

typedef struct {
    int cat; /* category */
    int isNull;
    union {
        int i;
        double d;
        dbString *s;
        dbDateTime *t;
    } val;
} dbCatVal;

?

Pointers should not take > 8 bytes (double) I believe.

Pointer and double could have different alignment requirements.

10-byte pointers on x86/64 are a theoretical possibility, but I don't
think that any platform actually uses them.

--
Glynn Clements <glynn@gclements.plus.com>