mirror of
https://github.com/bkthomps/Containers.git
synced 2025-12-25 08:47:31 +00:00
Simplify return values (#114)
Introduce bk_err and bk_bool rather than using int for both of these. This means that the function definition now specifies whether 0 means no error, or whether it means false.
This commit is contained in:
@@ -50,7 +50,11 @@ folder_path = 'src/include'
|
||||
for filename in sorted(glob.glob(os.path.join(folder_path, '*.h'))):
|
||||
with open(filename, 'r') as file:
|
||||
text = file.read()
|
||||
header += text.split("*/", 1)[1]
|
||||
entire_file = text.split("*/", 1)[1]
|
||||
split_around_include = entire_file.split('#include "all.h"\n\n', 1)
|
||||
header += split_around_include[0]
|
||||
if len(split_around_include) == 2:
|
||||
header += split_around_include[1]
|
||||
|
||||
containers_header_file = open("containers.h", "w+")
|
||||
containers_header_file.write(header)
|
||||
|
||||
Reference in New Issue
Block a user