diff options
author | Ian Romanick <idr@us.ibm.com> | 2005-02-01 00:28:47 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2005-02-01 00:28:47 +0000 |
commit | c2803587b6f2533514e1cfa9793d0a448e9c2c85 (patch) | |
tree | 19447b3f3e222b1280b5e7e9088b17ec3eafb959 /src/mesa/glapi/glX_proto_size.py | |
parent | ba09c19ed65051cd9244c8a5ff380d08e7db1aed (diff) |
Small refactor. Move several utility functions from glX_XML.py to
FilterGLAPISpecBase (in gl_XML.py). When these functions are used to emit
common #define lines, the will automatically be undefined in
FilterGLAPISpecBase::printFooter if header_tag is set (i.e., the file is a
header file).
These changes do not modify the generated code.
Diffstat (limited to 'src/mesa/glapi/glX_proto_size.py')
-rw-r--r-- | src/mesa/glapi/glX_proto_size.py | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/mesa/glapi/glX_proto_size.py b/src/mesa/glapi/glX_proto_size.py index e8a137c5e1..3030e7462b 100644 --- a/src/mesa/glapi/glX_proto_size.py +++ b/src/mesa/glapi/glX_proto_size.py @@ -170,13 +170,13 @@ class PrintGlxSizeStubs_c(PrintGlxSizeStubs_common): print '#include "indirect_size.h"' print '' - glX_XML.printHaveAlias() + self.printHaveAlias() print '' - glX_XML.printPure() + self.printPure() print '' - glX_XML.printFastcall() + self.printFastcall() print '' - glX_XML.printVisibility( "INTERNAL", "internal" ) + self.printVisibility( "INTERNAL", "internal" ) print '' print '' print '#ifdef HAVE_ALIAS' @@ -220,19 +220,13 @@ class PrintGlxSizeStubs_h(PrintGlxSizeStubs_common): * \\author Ian Romanick <idr@us.ibm.com> */ """ - glX_XML.printPure(); + self.printPure(); print '' - glX_XML.printFastcall(); + self.printFastcall(); print '' - glX_XML.printVisibility( "INTERNAL", "internal" ); + self.printVisibility( "INTERNAL", "internal" ); print '' - def printRealFooter(self): - print '' - print "# undef INTERNAL" - print "# undef PURE" - print "# undef FASTCALL" - def printFunction(self, f): ef = self.glx_enum_functions[f.name] @@ -250,16 +244,10 @@ class PrintGlxReqSize_h(glX_XML.GlxProto): def printRealHeader(self): - glX_XML.printVisibility("HIDDEN", "hidden") - print '' - glX_XML.printPure() + self.printVisibility("HIDDEN", "hidden") print '' - - - def printRealFooter(self): + self.printPure() print '' - print '# undef HIDDEN' - print '# undef PURE' def printFunction(self, f): @@ -300,7 +288,7 @@ class PrintGlxReqSize_c(glX_XML.GlxProto): print '' print '#define __GLX_PAD(x) (((x) + 3) & ~3)' print '' - glX_XML.printHaveAlias() + self.printHaveAlias() print '' print '#ifdef HAVE_ALIAS' print '# define ALIAS2(from,to) \\' |