Added buytes in the malloc method

This commit is contained in:
jai.s 2020-09-23 19:59:48 +05:30
parent ef087e571c
commit f409b15535
No known key found for this signature in database
GPG Key ID: 360CFA25EFC67D12

View File

@ -725,7 +725,7 @@ class _OpenSSL(object):
if data != 0:
if sys.version_info.major == 3 and isinstance(data, type('')):
data = data.encode()
buffer_ = self.create_string_buffer(data, size)
buffer_ = self.create_string_buffer(bytes(data), size)
else:
buffer_ = self.create_string_buffer(size)
return buffer_
@ -734,7 +734,6 @@ class _OpenSSL(object):
def loadOpenSSL():
"""Method find and load the OpenSSL library"""
# pylint: disable=global-statement, protected-access, too-many-branches
global OpenSSL
from os import path, environ
from ctypes.util import find_library