Mercurial > cpython-lru_cache-weakref
diff Modules/_struct.c @ 56246:3dec3b77b787 legacy-trunk
Eliminate unnecessary get_wrapped_(u)long defines in struct module.
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Sun, 27 Sep 2009 16:39:28 +0000 |
| parents | b3fb5e6b7e82 |
| children | e759ca25701d |
line wrap: on
line diff
--- a/Modules/_struct.c Sun Sep 27 16:05:21 2009 +0000 +++ b/Modules/_struct.c Sun Sep 27 16:39:28 2009 +0000 @@ -213,9 +213,6 @@ #endif -#define get_wrapped_long get_long -#define get_wrapped_ulong get_ulong - /* Floating point helpers */ static PyObject * @@ -525,7 +522,7 @@ { unsigned long x; unsigned int y; - if (get_wrapped_ulong(v, &x) < 0) + if (get_ulong(v, &x) < 0) return -1; y = (unsigned int)x; #if (SIZEOF_LONG > SIZEOF_INT) @@ -550,7 +547,7 @@ np_ulong(char *p, PyObject *v, const formatdef *f) { unsigned long x; - if (get_wrapped_ulong(v, &x) < 0) + if (get_ulong(v, &x) < 0) return -1; memcpy(p, (char *)&x, sizeof x); return 0; @@ -757,7 +754,7 @@ { long x; Py_ssize_t i; - if (get_wrapped_long(v, &x) < 0) + if (get_long(v, &x) < 0) return -1; i = f->size; if (i != SIZEOF_LONG) { @@ -780,7 +777,7 @@ { unsigned long x; Py_ssize_t i; - if (get_wrapped_ulong(v, &x) < 0) + if (get_ulong(v, &x) < 0) return -1; i = f->size; if (i != SIZEOF_LONG) { @@ -975,7 +972,7 @@ { long x; Py_ssize_t i; - if (get_wrapped_long(v, &x) < 0) + if (get_long(v, &x) < 0) return -1; i = f->size; if (i != SIZEOF_LONG) { @@ -998,7 +995,7 @@ { unsigned long x; Py_ssize_t i; - if (get_wrapped_ulong(v, &x) < 0) + if (get_ulong(v, &x) < 0) return -1; i = f->size; if (i != SIZEOF_LONG) {
