Skip to content

Commit 43ca67e

Browse files
committed
add task
1 parent a983a0f commit 43ca67e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ctypesgen/printer_python.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,12 @@ def print_library(self, opts):
138138
if opts.embed_templates:
139139
self.file.write(f"\n\n\n{content}")
140140
else:
141+
# we need to share libraries in a common file to build same-library headers separately while loading the library only once
142+
# FIXME reading EXT_LOADER and searching for a string pattern each time is dirty -- a dedicated json status file to track state might be cleaner
141143
loader_txt = self.EXT_LOADER.read_text()
142144
if name_define in loader_txt:
143145
status_message("Library already loaded in shared file, won't rewrite.")
144146
else:
145-
# we need to share libraries in a common file to build same-library headers separately while loading the library only once
146147
status_message("Adding library loader to shared file.")
147148
self.EXT_LOADER.write_text(f"{loader_txt}\n\n{content}\n")
148149

0 commit comments

Comments
 (0)