]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999)
authorPetr Viktorin <encukou@gmail.com>
Tue, 29 Dec 2020 23:32:07 +0000 (00:32 +0100)
committerGitHub <noreply@github.com>
Tue, 29 Dec 2020 23:32:07 +0000 (15:32 -0800)
commit056c08211b402b4dbc1530a9de9d00ad5309909f
treecd9e3eb367dde397f56fea413677eebcb4df1b34
parent2edfc86f69d8a74f4821974678f664ff94a9dc22
bpo-40052: Fix alignment issue in PyVectorcall_Function() (GH-23999)

```
In file included from /usr/include/python3.8/Python.h:147:
In file included from /usr/include/python3.8/abstract.h:837:
/usr/include/python3.8/cpython/abstract.h:91:11: error: cast from 'char *' to 'vectorcallfunc *'
(aka 'struct _object *(**)(struct _object *, struct _object *const *, unsigned long, struct _object *)')
increases required alignment from 1 to 8 [-Werror,-Wcast-align]

    ptr = (vectorcallfunc*)(((char *)callable) + offset);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
Co-Authored-By: Andreas Schneider <asn@cryptomilk.org>
Co-Authored-By: Antoine Pitrou <antoine@python.org>
Include/cpython/abstract.h
Misc/NEWS.d/next/C API/2020-03-24-09-27-10.bpo-40052.27P2KG.rst [new file with mode: 0644]
Objects/call.c