summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-02-24 18:36:32 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-02-24 18:36:32 +0000
commitb5d049f15ef387bdd9f51d6d0b9a3c6dc59ba061 (patch)
tree191941ab20be8350f97bb5dd105d43b96e5804b5 /src
parent87ae69c45dcaaf6bafe0ca210a0e2a655c63792f (diff)
added some error checking
Diffstat (limited to 'src')
-rw-r--r--src/mesa/glapi/gloffsets.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/glapi/gloffsets.py b/src/mesa/glapi/gloffsets.py
index 5cdc07b643..40b1de8081 100644
--- a/src/mesa/glapi/gloffsets.py
+++ b/src/mesa/glapi/gloffsets.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# $Id: gloffsets.py,v 1.2 2000/02/22 23:59:25 brianp Exp $
+# $Id: gloffsets.py,v 1.3 2000/02/24 18:36:32 brianp Exp $
# Mesa 3-D graphics library
# Version: 3.3
@@ -88,13 +88,21 @@ def PrintDefines():
if funcOffset > maxOffset:
maxOffset = funcOffset
s = GenerateDefine(funcName, funcOffset)
- offsetInfo[funcOffset] = s;
+ if offsetInfo.has_key(funcOffset):
+ print 'ERROR: offset', funcOffset, 'already used!'
+ raise ERROR
+ else:
+ offsetInfo[funcOffset] = s;
#endif
#endfor
# Now print the #defines in order of dispatch offset
for i in range(0, maxOffset + 1):
- print offsetInfo[i]
+ if offsetInfo.has_key(i):
+ print offsetInfo[i]
+ else:
+ print 'ERROR: missing offset:', i
+ raise ERROR
#enddef