Some types of addresses are data structures; make the address data

pointer in an address structure a "void *", to indicate that it can
point to some arbitrary type of object, rather than a "guint8 *", which
indicates that it points to an array of bytes.

For any address type where the address is a structure, this removes some
alignment warnings; the author of the code to handle a particular
address type has the responsibility of making sure you don't set up the
address structure with misaligned data.  (Yes, it matters, at least on
SPARC.)

svn path=/trunk/; revision=21563
This commit is contained in:
Guy Harris 2007-04-25 19:28:56 +00:00
parent cde0384abc
commit c3ac6f1e71
1 changed files with 2 additions and 2 deletions

View File

@ -60,13 +60,13 @@ typedef enum {
typedef struct _address {
address_type type; /* type of address */
int len; /* length of address, in bytes */
const guint8 *data; /* bytes that constitute address */
const void *data; /* pointer to address data */
} address;
#define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \
(addr)->type = (addr_type); \
(addr)->len = (addr_len); \
(addr)->data = (const void *)(addr_data); \
(addr)->data = (addr_data); \
}
/*