Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
asn1-value-editor
Commits
7d4e4124
Commit
7d4e4124
authored
Jun 13, 2018
by
Maxime Perrotin
Browse files
Try to deal with ctypes on 64 bits platforms
parent
622c73c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
asn1_value_editor/sdlHandler.py
View file @
7d4e4124
...
@@ -499,7 +499,13 @@ class sdlHandler(QObject):
...
@@ -499,7 +499,13 @@ class sdlHandler(QObject):
typename
=
sort
.
ReferencedTypeName
.
replace
(
'-'
,
'_'
)
typename
=
sort
.
ReferencedTypeName
.
replace
(
'-'
,
'_'
)
# ctypes hint: don't use c_char_p except for text strings
# ctypes hint: don't use c_char_p except for text strings
get_value
=
getattr
(
self
.
dll
,
"{}_value"
.
format
(
var
))
get_value
=
getattr
(
self
.
dll
,
"{}_value"
.
format
(
var
))
get_value
.
restype
=
ctypes
.
c_void_p
class
ReturnPointer
(
ctypes
.
Structure
):
pass
ReturnHandle
=
ctypes
.
POINTER
(
ReturnPointer
)
get_value
.
restype
=
ReturnHandle
# Apparently c_void_p is not 64-bits friendly...
#get_value.restype = ctypes.c_void_p
value
=
get_value
()
value
=
get_value
()
asn1_instance
=
getattr
(
ASN1
,
typename
)()
asn1_instance
=
getattr
(
ASN1
,
typename
)()
asn1_instance
.
SetData
(
value
)
asn1_instance
.
SetData
(
value
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment