diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2018-04-08 02:04:09 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2018-04-08 02:04:09 +0300 |
commit | 4b294d16741aaf81c525e789244f7b68a9e8a781 (patch) | |
tree | 29c3ac054397cec1c67b129c1775255c812a9902 /scripts | |
parent | 60cce3d8b8cce953c67ecb22a082ad4d4c1d3aa9 (diff) |
Refresh the free functions
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/make_free_functions.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/make_free_functions.py b/scripts/make_free_functions.py index 9cb1f38a..6b2d6f1f 100644 --- a/scripts/make_free_functions.py +++ b/scripts/make_free_functions.py @@ -19,12 +19,17 @@ for header in glob.glob("../include/afio/*/*.hpp"): if 'AFIO_MAKE_FREE_FUNCTION' in lines[lineidx] and re.match('\s*AFIO_MAKE_FREE_FUNCTION', lines[lineidx]): function = '' for n in range(1, 100): + if 'AFIO_REQUIRES' in lines[lineidx+n]: + continue function += lines[lineidx+n] if lineidx+n+1 >= len(lines): print(lines[lineidx:]) raise Exception() if '{' in lines[lineidx+n+1] or ';' in lines[lineidx+n]: break + function = function.replace('//\n', '') + function = function.replace('\n', '') + function = function.replace(';', '') docs = '' if '*/' in lines[lineidx-1] or '//!' in lines[lineidx-1]: for n in range(1, 100): @@ -50,7 +55,7 @@ for header in glob.glob("../include/afio/*/*.hpp"): lines.insert(functions_to_be_freed_begin, '// BEGIN make_free_functions.py\n') idx = functions_to_be_freed_begin + 1 for classname, function, docs in functions_to_be_freed: - #print((classname, function)) + print((classname, function)) function = function.replace('virtual ', '') function = function.replace('override', '') function = function.replace('AFIO_HEADERS_ONLY_MEMFUNC_SPEC ', '') @@ -74,9 +79,12 @@ for header in glob.glob("../include/afio/*/*.hpp"): function = replace(function, 'path_view_type') function = replace(function, 'extent_type') function = replace(function, 'size_type') + function = replace(function, 'buffer_type') + function = replace(function, 'const_buffer_type') + function = replace(function, 'enumerate_info') function = replace(function, 'buffers_type') function = replace(function, 'const_buffers_type') - function = replace(function, 'enumerate_info') + function = replace(function, 'io_state_ptr') function = function.replace('path_view_type()', classname+'::path_view_type()') function = function.replace(' io_result<', ' '+classname+'::io_result<') function = function.replace(' io_request<', ' '+classname+'::io_request<') |