@@ -503,51 +503,6 @@ class Test3B(Test3A):
503
503
('more_data' , c_float * 2 ),
504
504
]
505
505
506
- class Test3C1 (Structure ):
507
- _fields_ = [
508
- ("data" , c_double * 4 )
509
- ]
510
-
511
- class DataType4 (Array ):
512
- _type_ = c_double
513
- _length_ = 4
514
-
515
- class Test3C2 (Structure ):
516
- _fields_ = [
517
- ("data" , DataType4 )
518
- ]
519
-
520
- class Test3C3 (Structure ):
521
- _fields_ = [
522
- ("x" , c_double ),
523
- ("y" , c_double ),
524
- ("z" , c_double ),
525
- ("t" , c_double )
526
- ]
527
-
528
- class Test3D1 (Structure ):
529
- _fields_ = [
530
- ("data" , c_double * 5 )
531
- ]
532
-
533
- class DataType5 (Array ):
534
- _type_ = c_double
535
- _length_ = 5
536
-
537
- class Test3D2 (Structure ):
538
- _fields_ = [
539
- ("data" , DataType5 )
540
- ]
541
-
542
- class Test3D3 (Structure ):
543
- _fields_ = [
544
- ("x" , c_double ),
545
- ("y" , c_double ),
546
- ("z" , c_double ),
547
- ("t" , c_double ),
548
- ("u" , c_double )
549
- ]
550
-
551
506
# Load the shared library
552
507
dll = CDLL (_ctypes_test .__file__ )
553
508
@@ -596,6 +551,58 @@ class Test3D3(Structure):
596
551
self .assertAlmostEqual (s .more_data [0 ], - 3.0 , places = 6 )
597
552
self .assertAlmostEqual (s .more_data [1 ], - 2.0 , places = 6 )
598
553
554
+ @unittest .skipIf (
555
+ 'ppc64le' in platform .uname ().machine ,
556
+ "gh-110190: currently fails on ppc64le" ,
557
+ )
558
+ def test_array_in_struct_registers (self ):
559
+ dll = CDLL (_ctypes_test .__file__ )
560
+
561
+ class Test3C1 (Structure ):
562
+ _fields_ = [
563
+ ("data" , c_double * 4 )
564
+ ]
565
+
566
+ class DataType4 (Array ):
567
+ _type_ = c_double
568
+ _length_ = 4
569
+
570
+ class Test3C2 (Structure ):
571
+ _fields_ = [
572
+ ("data" , DataType4 )
573
+ ]
574
+
575
+ class Test3C3 (Structure ):
576
+ _fields_ = [
577
+ ("x" , c_double ),
578
+ ("y" , c_double ),
579
+ ("z" , c_double ),
580
+ ("t" , c_double )
581
+ ]
582
+
583
+ class Test3D1 (Structure ):
584
+ _fields_ = [
585
+ ("data" , c_double * 5 )
586
+ ]
587
+
588
+ class DataType5 (Array ):
589
+ _type_ = c_double
590
+ _length_ = 5
591
+
592
+ class Test3D2 (Structure ):
593
+ _fields_ = [
594
+ ("data" , DataType5 )
595
+ ]
596
+
597
+ class Test3D3 (Structure ):
598
+ _fields_ = [
599
+ ("x" , c_double ),
600
+ ("y" , c_double ),
601
+ ("z" , c_double ),
602
+ ("t" , c_double ),
603
+ ("u" , c_double )
604
+ ]
605
+
599
606
# Tests for struct Test3C
600
607
expected = (1.0 , 2.0 , 3.0 , 4.0 )
601
608
func = dll ._testfunc_array_in_struct_set_defaults_3C
0 commit comments