summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2015-05-20 15:51:40 -0700
committerDylan Baker <baker.dylan.c@gmail.com>2015-05-21 09:44:14 -0700
commit23ed2785aa063e919749e76ba746f12762c9f62b (patch)
treee79f14904344603751ec7f3310ed79a28434e3e0
parent6226e2567f127b612f845682ed967de7b96c34de (diff)
glapi: glX_proto_size.py: use a main functionsubmit/generator-argparse
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--src/mapi/glapi/gen/glX_proto_size.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/glX_proto_size.py b/src/mapi/glapi/gen/glX_proto_size.py
index 59f65d49ce..75fc26f5db 100644
--- a/src/mapi/glapi/gen/glX_proto_size.py
+++ b/src/mapi/glapi/gen/glX_proto_size.py
@@ -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()