X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=scripts%2Fextgen.py;h=15ef167bfaf60c9d3de0a162e53b13f7150ace26;hb=ae1fe9121b341c7852e54aa586f23edaf21b664c;hp=ff40ec60eadd1f515336f78d4d82eec2e0cfdfff;hpb=e19309340e90ee881e9cb2f8b7c33a5b89681aa6;p=libs%2Fgl.git diff --git a/scripts/extgen.py b/scripts/extgen.py index ff40ec60..15ef167b 100755 --- a/scripts/extgen.py +++ b/scripts/extgen.py @@ -399,7 +399,7 @@ def detect_backport_extension(host_api, things): best_ext = e best_count = count - if best_count*2>=total_count: + if total_count and best_count*2>=total_count: print "Warning: Inconsistent backport extension %s"%best_ext.name def collect_extensions(thing, api, exts): @@ -514,7 +514,7 @@ class SourceGenerator: self.enums.sort(key=(lambda e: e.value)) self.core_version = detect_core_version(host_api, things, debug) self.deprecated_version = detect_deprecated_version(host_api, things, debug) - self.backport_ext = detect_backport_extension(host_api, things); + self.backport_ext = detect_backport_extension(host_api, things) b, e = detect_source_extension(host_api, things, debug) self.base_version = b self.source_exts = e @@ -642,7 +642,7 @@ namespace GL { supp = f.api_support.get(self.host_api.name) src = None for e in self.source_exts: - if f in e.things: + if f.name in e.things: src = f elif supp: for s in supp.sources: