Skip to content

Commit

Permalink
Fix faulty c_ext logic in ion_load_dump
Browse files Browse the repository at this point in the history
  • Loading branch information
popematt committed Jul 26, 2023
1 parent 20c3991 commit c464c97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion amazon/ionbenchmark/ion_load_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ class IonLoadDump:
def __init__(self, binary, c_ext=None):
self._binary = binary
self._single_value = False
self._c_ext = c_ext if c_ext is not None else True

import platform
_is_c_ext_supported = platform.python_implementation() == "CPython"
_resolved_c_ext_argument = c_ext if c_ext is not None else True
self._c_ext = _resolved_c_ext_argument and _is_c_ext_supported

def loads(self, s):
ion.c_ext = self._c_ext
Expand Down

0 comments on commit c464c97

Please sign in to comment.