Skip to content

Commit 2d4bc69

Browse files
committed
sqlite3: Pass sys.byteorder to int.from_bytes().
Following it now being mandatory in MicroPython.
1 parent 4cae9a3 commit 2d4bc69

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sqlite3/sqlite3.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import ffilib
23

34

@@ -87,7 +88,7 @@ def execute(self, sql, params=None):
8788
b = bytearray(4)
8889
s = sqlite3_prepare(self.h, sql, -1, b, None)
8990
check_error(self.h, s)
90-
self.stmnt = int.from_bytes(b)
91+
self.stmnt = int.from_bytes(b, sys.byteorder)
9192
#print("stmnt", self.stmnt)
9293
self.num_cols = sqlite3_column_count(self.stmnt)
9394
#print("num_cols", self.num_cols)
@@ -130,7 +131,7 @@ def fetchone(self):
130131
def connect(fname):
131132
b = bytearray(4)
132133
sqlite3_open(fname, b)
133-
h = int.from_bytes(b)
134+
h = int.from_bytes(b, sys.byteorder)
134135
return Connections(h)
135136

136137

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy