mirror of
https://github.com/corundum/corundum.git
synced 2025-01-30 08:32:52 +08:00
Always make a copy of the data array
This commit is contained in:
parent
e1955a29da
commit
54bc201f52
@ -33,14 +33,12 @@ class AXIStreamFrame(object):
|
||||
self.keep = None
|
||||
self.user = None
|
||||
|
||||
if type(data) is bytes:
|
||||
data = bytearray(data)
|
||||
if type(data) is bytearray:
|
||||
self.data = data
|
||||
if type(data) is bytes or type(data) is bytearray:
|
||||
self.data = bytearray(data)
|
||||
if type(data) is AXIStreamFrame:
|
||||
self.N = data.N
|
||||
self.WL = data.WL
|
||||
self.data = data.data
|
||||
self.data = bytearray(data.data)
|
||||
if data.keep is not None:
|
||||
self.keep = list(data.keep)
|
||||
if data.user is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user