[Python-checkins] cpython: Issue #15589: Ensure double-alignment for brute-force capi argument parser test

larry.hastings python-checkins at python.org
Wed Aug 8 23:52:37 CEST 2012


http://hg.python.org/cpython/rev/efb30bdcfa1e
changeset:   78466:efb30bdcfa1e
user:        Larry Hastings <larry at hastings.org>
date:        Wed Aug 08 14:52:22 2012 -0700
summary:
  Issue #15589: Ensure double-alignment for brute-force capi argument parser test
that occasionally uses doubles.

files:
  Modules/_testcapimodule.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -1210,7 +1210,7 @@
     int result;
     PyObject *return_value = NULL;
 
-    char buffers[32][8];
+    double buffers[8][4]; /* double ensures alignment where necessary */
 
     if (!PyArg_ParseTuple(args, "OOyO:parse_tuple_and_keywords",
         &sub_args, &sub_kwargs,

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list