Fix qglbuffer test on Python3.
This commit is contained in:
parent
1cefc09118
commit
7202e2b8df
2 changed files with 11 additions and 7 deletions
|
|
@ -1,4 +1,6 @@
|
|||
def b(s):
|
||||
if type(s) == bytes:
|
||||
return s
|
||||
return bytes(s, "UTF8")
|
||||
|
||||
def buffer_(s):
|
||||
|
|
@ -6,6 +8,8 @@ def buffer_(s):
|
|||
return None
|
||||
elif type(s) == str:
|
||||
return bytes(s, "UTF8")
|
||||
elif type(s) == bytes:
|
||||
return s
|
||||
else:
|
||||
memoryview(s)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue