mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 23:35:04 -04:00
update unbound from upstream
This commit is contained in:
parent
b0151de601
commit
1f49833d4f
155 changed files with 5482 additions and 3440 deletions
|
@ -44,6 +44,10 @@
|
|||
|
||||
%pythoncode %{
|
||||
import encodings.idna
|
||||
try:
|
||||
import builtins
|
||||
except ImportError:
|
||||
import __builtin__ as builtins
|
||||
|
||||
# Ensure compatibility with older python versions
|
||||
if 'bytes' not in vars():
|
||||
|
@ -52,7 +56,7 @@
|
|||
def ord(s):
|
||||
if isinstance(s, int):
|
||||
return s
|
||||
return __builtins__.ord(s)
|
||||
return builtins.ord(s)
|
||||
%}
|
||||
|
||||
//%include "doc.i"
|
||||
|
@ -699,7 +703,7 @@ Result: ['74.125.43.147', '74.125.43.99', '74.125.43.103', '74.125.43.104']
|
|||
while (idx < slen):
|
||||
complen = ord(s[idx])
|
||||
# In python 3.x `str()` converts the string to unicode which is the expected text string type
|
||||
res.append(str(s[idx+1:idx+1+complen]))
|
||||
res.append(str(s[idx+1:idx+1+complen].decode()))
|
||||
idx += complen + 1
|
||||
|
||||
return res
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue