Added buytes in the malloc method
This commit is contained in:
parent
ef087e571c
commit
f409b15535
|
@ -725,7 +725,7 @@ class _OpenSSL(object):
|
||||||
if data != 0:
|
if data != 0:
|
||||||
if sys.version_info.major == 3 and isinstance(data, type('')):
|
if sys.version_info.major == 3 and isinstance(data, type('')):
|
||||||
data = data.encode()
|
data = data.encode()
|
||||||
buffer_ = self.create_string_buffer(data, size)
|
buffer_ = self.create_string_buffer(bytes(data), size)
|
||||||
else:
|
else:
|
||||||
buffer_ = self.create_string_buffer(size)
|
buffer_ = self.create_string_buffer(size)
|
||||||
return buffer_
|
return buffer_
|
||||||
|
@ -734,7 +734,6 @@ class _OpenSSL(object):
|
||||||
def loadOpenSSL():
|
def loadOpenSSL():
|
||||||
"""Method find and load the OpenSSL library"""
|
"""Method find and load the OpenSSL library"""
|
||||||
# pylint: disable=global-statement, protected-access, too-many-branches
|
# pylint: disable=global-statement, protected-access, too-many-branches
|
||||||
|
|
||||||
global OpenSSL
|
global OpenSSL
|
||||||
from os import path, environ
|
from os import path, environ
|
||||||
from ctypes.util import find_library
|
from ctypes.util import find_library
|
||||||
|
|
Reference in New Issue
Block a user