diff options
Diffstat (limited to 'third_party/ffmpeg/generate_stubs.py')
-rwxr-xr-x | third_party/ffmpeg/generate_stubs.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/third_party/ffmpeg/generate_stubs.py b/third_party/ffmpeg/generate_stubs.py index 1288697..1713d76 100755 --- a/third_party/ffmpeg/generate_stubs.py +++ b/third_party/ffmpeg/generate_stubs.py @@ -575,6 +575,7 @@ void %s(); // Umbrella initializer for all the modules in this stub file. bool InitializeStubs(const StubPathMap& path_map); + } // namespace %s #endif // %s @@ -588,15 +589,17 @@ bool InitializeStubs(const StubPathMap& path_map); outfile: The file handle to populate. """ outfile.write('extern "C" {\n') + outfile.write('\n') self.WriteFunctionPointers(outfile) self.WriteStubFunctions(outfile) + outfile.write('\n') outfile.write('} // extern "C"\n') outfile.write('\n') outfile.write('namespace %s {\n' % namespace) outfile.write('\n') self.WriteModuleInitializeFunctions(outfile) - outfile.write('} // namespace %s\n' % namespace) + outfile.write('} // namespace %s\n\n' % namespace) def WriteFunctionPointers(self, outfile): """Write the function pointer declarations needed by the stubs. @@ -738,7 +741,7 @@ def main(): if options.out_dir is None: parser.error('Output location not specified') - if args: + if len(args) == 0: parser.error('No inputs specified') if options.type not in [FILE_TYPE_WIN, FILE_TYPE_POSIX_STUB]: @@ -788,6 +791,7 @@ def main(): impl_file) if options.extra_stub_header is not None: try: + impl_file.write('\n') extra_header_file = open(options.extra_stub_header, 'r') for line in extra_header_file: impl_file.write(line) |