[Python-modules-commits] [asyncpg] 06/08: merge patched into master

Piotr Ożarowski piotr at moszumanska.debian.org
Wed Oct 25 09:02:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

piotr pushed a commit to branch master
in repository asyncpg.

commit 141a4ac0360692c33b2311f409cb439bb2f429ba
Merge: 44e67b4 83c0ec5
Author: Piotr Ożarowski <piotr at debian.org>
Date:   Wed Oct 25 10:23:49 2017 +0200

    merge patched into master

 asyncpg/protocol/hton.pxd                          |  7 ++--
 debian/.git-dpm                                    |  4 +--
 ...1-use-alignment-safe-unpacking-of-buffers.patch | 37 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 4 files changed, 45 insertions(+), 4 deletions(-)

diff --cc debian/.git-dpm
index 8758a4b,0000000..92a01dc
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- 5e271c5f75c54db706e449c339006be093f471be
- 5e271c5f75c54db706e449c339006be093f471be
++83c0ec5802b588cf7c5d559f5c14773468323ad9
++83c0ec5802b588cf7c5d559f5c14773468323ad9
 +5e271c5f75c54db706e449c339006be093f471be
 +5e271c5f75c54db706e449c339006be093f471be
 +asyncpg_0.13.0.orig.tar.gz
 +c690a2eb78edbcb8c92e82da85981bbe27ef3ebd
 +573374
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/0001-use-alignment-safe-unpacking-of-buffers.patch
index 0000000,0000000..a51a8e3
new file mode 100644
--- /dev/null
+++ b/debian/patches/0001-use-alignment-safe-unpacking-of-buffers.patch
@@@ -1,0 -1,0 +1,37 @@@
++From 83c0ec5802b588cf7c5d559f5c14773468323ad9 Mon Sep 17 00:00:00 2001
++From: Steve Langasek <steve.langasek at ubuntu.com>
++Date: Wed, 25 Oct 2017 10:22:58 +0200
++Subject: use alignment-safe unpacking of buffers
++
++Casting a char* to an int32* is not universally safe due to alignment
++constraints on reads on some platforms.  So skip using ntohl(), just
++unpack this ourselves.
++---
++ asyncpg/protocol/hton.pxd | 7 +++++--
++ 1 file changed, 5 insertions(+), 2 deletions(-)
++
++diff --git a/asyncpg/protocol/hton.pxd b/asyncpg/protocol/hton.pxd
++index 89ca506..219d837 100644
++--- a/asyncpg/protocol/hton.pxd
+++++ b/asyncpg/protocol/hton.pxd
++@@ -5,7 +5,7 @@
++ # the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
++ 
++ 
++-from libc.stdint cimport int16_t, int32_t, uint16_t, uint32_t, int64_t, uint64_t
+++from libc.stdint cimport uint8_t, int16_t, int32_t, uint16_t, uint32_t, int64_t, uint64_t
++ 
++ 
++ IF UNAME_SYSNAME == "Windows":
++@@ -35,7 +35,10 @@ cdef inline void pack_int32(char* buf, int32_t x):
++ 
++ 
++ cdef inline int32_t unpack_int32(const char* buf):
++-    return <int32_t>ntohl((<uint32_t*>buf)[0])
+++    cdef uint32_t hh = (<uint8_t *>buf)[0]
+++    hh = (hh << 8) | (<uint8_t *>buf)[1]
+++    hh = (hh << 8) | (<uint8_t *>buf)[2]
+++    return <int32_t>((hh << 8) | (<uint8_t *>buf)[3])
++ 
++ 
++ cdef inline void pack_int64(char* buf, int64_t x):
diff --cc debian/patches/series
index 0000000,0000000..8236aa5
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,1 @@@
++0001-use-alignment-safe-unpacking-of-buffers.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/asyncpg.git



More information about the Python-modules-commits mailing list