Skip to content

Commit

Permalink
CLI: fix {compile,runtime}_libdirs mutilation (ctypesgen#203)
Browse files Browse the repository at this point in the history
Amends ctypesgen#161

See ctypesgen#161 (comment) for explanation
  • Loading branch information
mara004 committed Jan 17, 2024
1 parent 71f220f commit 0f0c5d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ctypesgen/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,10 @@ def main(givenargs=None):
parser.set_defaults(**core_options.default_values)
args = parser.parse_args(givenargs)

args.compile_libdirs += args.universal_libdirs
args.runtime_libdirs += args.universal_libdirs
# Important: don't use +=, it modifies the original list instead of
# creating a new one. This can be problematic with repeated API calls.
args.compile_libdirs = args.compile_libdirs + args.universal_libdirs
args.runtime_libdirs = args.runtime_libdirs + args.universal_libdirs

# Figure out what names will be defined by imported Python modules
args.other_known_names = find_names_in_modules(args.modules)
Expand Down

0 comments on commit 0f0c5d6

Please sign in to comment.