~ubuntu-branches/ubuntu/saucy/python2.7/saucy-updates

« back to all changes in this revision

Viewing changes to Modules/_ctypes/libffi/testsuite/libffi.call/nested_struct1.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-03-23 19:56:03 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20130323195603-ftu05fam0tvkpkro
Tags: 2.7.4~rc1-0ubuntu1
* Python 2.7.4 release candidate 1.
  - Issue #10211: Buffer objects expose the new buffer interface internally.
  - Issue #10212: cStringIO and struct.unpack support new buffer objects.
  - Issue #12098: multiprocessing on Windows now starts child processes
    using the same sys.flags as the current process.
  - Issue #8862: Fixed curses cleanup when getkey is interrputed by a signal.
  - Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or
    EAGAIN, retry the select() loop instead of bailing out.
  - Issue #1285086: Get rid of the refcounting hack and speed up
    urllib.unquote().
  - Issue #17368: Fix an off-by-one error in the Python JSON decoder
    that caused a failure while decoding empty object literals when
    object_pairs_hook was specified.
  - Issue #17477: Update the bsddb module to pybsddb 5.3.0, supporting
    db-5.x, and dropping support for db-4.1 and db-4.2.
  - Issue #17192: Update the ctypes module's libffi to v3.0.13.  This
    specifically addresses a stack misalignment issue on x86 and issues on
    some more recent platforms.
  - Issue #11420: make test suite pass with -B/DONTWRITEBYTECODE set.
  - Issue #17299: Add test coverage for cPickle with file objects
    and general IO objects.
  - Issue #11963: remove human verification from test_parser and
    test_subprocess.
  - Issue #16004: Add `make touch`.
  - Issue #17047: remove doubled words in docs and docstrings
* Rework the sysconfigdata patch into something upstreamable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
  ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
82
82
  ffi_type* dbl_arg_types[5];
83
83
 
 
84
  struct cls_struct_16byte1 e_dbl = { 9.0, 2.0, 6};
 
85
  struct cls_struct_16byte2 f_dbl = { 1, 2.0, 3.0};
 
86
  struct cls_struct_combined g_dbl = {{4.0, 5.0, 6},
 
87
                                      {3, 1.0, 8.0}};
 
88
  struct cls_struct_16byte1 h_dbl = { 3.0, 2.0, 4};
 
89
  struct cls_struct_combined res_dbl;
 
90
 
84
91
  cls_struct_type.size = 0;
85
92
  cls_struct_type.alignment = 0;
86
93
  cls_struct_type.type = FFI_TYPE_STRUCT;
96
103
  cls_struct_type2.type = FFI_TYPE_STRUCT;
97
104
  cls_struct_type2.elements = cls_struct_fields2;
98
105
 
99
 
  struct cls_struct_16byte1 e_dbl = { 9.0, 2.0, 6};
100
 
  struct cls_struct_16byte2 f_dbl = { 1, 2.0, 3.0};
101
 
  struct cls_struct_combined g_dbl = {{4.0, 5.0, 6},
102
 
                                      {3, 1.0, 8.0}};
103
 
  struct cls_struct_16byte1 h_dbl = { 3.0, 2.0, 4};
104
 
  struct cls_struct_combined res_dbl;
105
 
 
106
106
  cls_struct_fields[0] = &ffi_type_double;
107
107
  cls_struct_fields[1] = &ffi_type_float;
108
108
  cls_struct_fields[2] = &ffi_type_sint;
156
156
  CHECK( res_dbl.e.ii == (e_dbl.c + f_dbl.ii + g_dbl.e.ii));
157
157
  CHECK( res_dbl.e.dd == (e_dbl.a + f_dbl.dd + g_dbl.e.dd));
158
158
  CHECK( res_dbl.e.ff == (e_dbl.b + f_dbl.ff + g_dbl.e.ff));
159
 
  //  CHECK( 1 == 0);
 
159
  /*  CHECK( 1 == 0); */
160
160
  exit(0);
161
161
}