- Fix pyunbound ord call, portable for python 2 and 3.

git-svn-id: file:///svn/unbound/trunk@3313 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2015-01-12 15:20:20 +00:00
parent f890257321
commit 03d1afc32a
2 changed files with 6 additions and 1 deletions

View file

@ -1,5 +1,6 @@
12 January 2015: Wouter
- Cast sun_len sizeof to socklen_t.
- Fix pyunbound ord call, portable for python 2 and 3.
7 January 2015: Wouter
- Fix warnings in pythonmod changes.

View file

@ -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"