Set argc in one place as suggested by @paulromano.

This commit is contained in:
Patrick Shriwise 2020-04-08 09:25:45 -05:00
parent ca56044904
commit 40a64f785f

View file

@ -185,11 +185,10 @@ def init(args=None, intracomm=None):
"""
if args is not None:
args = ['openmc'] + list(args)
argc = len(args)
else:
args = ['openmc']
argc = 1
argc = len(args)
# Create the argv array. Note that it is actually expected to be of
# length argc + 1 with the final item being a null pointer.
argv = (POINTER(c_char) * (argc + 1))()