diff options
author | Guido van Rossum <guido@python.org> | 2001-10-24 20:42:55 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-10-24 20:42:55 (GMT) |
commit | e2ae77b8b8a62e648bb1864a9b36ef3280984404 (patch) | |
tree | e03ad6f126a16529b2fb43671903e357bcb05835 /Modules/structmodule.c | |
parent | c6ac8a78f668123ec5c2c3d5a824e7886e9a1c60 (diff) | |
download | cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.zip cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.tar.gz cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.tar.bz2 |
SF patch #474590 -- RISC OS support
Diffstat (limited to 'Modules/structmodule.c')
-rw-r--r-- | Modules/structmodule.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Modules/structmodule.c b/Modules/structmodule.c index 61436f9..8cc4945 100644 --- a/Modules/structmodule.c +++ b/Modules/structmodule.c @@ -53,19 +53,19 @@ static PyObject *StructError; #endif #endif /* __MWERKS__ */ -typedef struct { char c; short x; } s_short; -typedef struct { char c; int x; } s_int; -typedef struct { char c; long x; } s_long; -typedef struct { char c; float x; } s_float; -typedef struct { char c; double x; } s_double; -typedef struct { char c; void *x; } s_void_p; - -#define SHORT_ALIGN (sizeof(s_short) - sizeof(short)) -#define INT_ALIGN (sizeof(s_int) - sizeof(int)) -#define LONG_ALIGN (sizeof(s_long) - sizeof(long)) -#define FLOAT_ALIGN (sizeof(s_float) - sizeof(float)) -#define DOUBLE_ALIGN (sizeof(s_double) - sizeof(double)) -#define VOID_P_ALIGN (sizeof(s_void_p) - sizeof(void *)) +typedef struct { char c; short x; } st_short; +typedef struct { char c; int x; } st_int; +typedef struct { char c; long x; } st_long; +typedef struct { char c; float x; } st_float; +typedef struct { char c; double x; } st_double; +typedef struct { char c; void *x; } st_void_p; + +#define SHORT_ALIGN (sizeof(st_short) - sizeof(short)) +#define INT_ALIGN (sizeof(st_int) - sizeof(int)) +#define LONG_ALIGN (sizeof(st_long) - sizeof(long)) +#define FLOAT_ALIGN (sizeof(st_float) - sizeof(float)) +#define DOUBLE_ALIGN (sizeof(st_double) - sizeof(double)) +#define VOID_P_ALIGN (sizeof(st_void_p) - sizeof(void *)) /* We can't support q and Q in native mode unless the compiler does; in std mode, they're 8 bytes on all platforms. */ |