glapi: glX_proto_size.py: use a main function
authorDylan Baker <baker.dylan.c@gmail.com>
Wed, 20 May 2015 22:51:40 +0000 (15:51 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 22 May 2015 18:31:28 +0000 (11:31 -0700)
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
src/mapi/glapi/gen/glX_proto_size.py

index 59f65d49ce022ec6ba650388e82de87999606433..75fc26f5db0eb71036bbaaad1abe0f21cf251047 100644 (file)
@@ -684,7 +684,8 @@ def _parser():
     return parser.parse_args()
 
 
-if __name__ == '__main__':
+def main():
+    """Main function."""
     args = _parser()
 
     if args.mode == "size_c":
@@ -701,3 +702,7 @@ if __name__ == '__main__':
     api = gl_XML.parse_GL_API(args.filename, glX_XML.glx_item_factory())
 
     printer.Print(api)
+
+
+if __name__ == '__main__':
+    main()