Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ Per Lindqvist
Eric Lindvall
Gregor Lingl
Everett Lipman
Jake Lishman
Mirko Liss
Alexander Liu
Hui Liu
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The empty instances of :func:`bytearray` and :func:`array.array` now produce
buffers that are aligned for any data type. This is a convenience for
interoperation with other languages.
2 changes: 1 addition & 1 deletion Modules/arraymodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2655,7 +2655,7 @@ array_ass_subscr(PyObject *op, PyObject *item, PyObject *value)
}
}

static const void *emptybuf = "";
static const _Py_ALIGNED_DEF(ALIGNOF_MAX_ALIGN_T, char) emptybuf[] = "";


static int
Expand Down
2 changes: 1 addition & 1 deletion Objects/bytearrayobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class bytearray "PyByteArrayObject *" "&PyByteArray_Type"
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=5535b77c37a119e0]*/

/* For PyByteArray_AS_STRING(). */
char _PyByteArray_empty_string[] = "";
_Py_ALIGNED_DEF(ALIGNOF_MAX_ALIGN_T, char) _PyByteArray_empty_string[] = "";

/* Helpers */

Expand Down
Loading