]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/distrib/build_renamers.py
reSWIGged
[wxWidgets.git] / wxPython / distrib / build_renamers.py
index 022051b8dc0c787600fb3e6e2da153e85da1a535..5a56b9214b75ea18375abc75de3286834108a190 100755 (executable)
@@ -134,7 +134,7 @@ def main(args):
 
 def GetAttr(node, name):
     path = "./attributelist/attribute[@name='%s']/@value" % name
-    n = node.xpathEval(path)
+    n = node.xpathEval2(path)
     if len(n):
         return n[0].content
     else:
@@ -148,7 +148,7 @@ def processXML(xmlfile, modname, swigFile, pyFile):
     topnode = libxml2.parseFile(xmlfile).children
 
     # remove any import nodes as we don't need to do renamers for symbols found therein
-    imports = topnode.xpathEval("*/import")
+    imports = topnode.xpathEval2("*/import")
     for n in imports:
         n.unlinkNode()
         n.freeNode()
@@ -211,7 +211,7 @@ def processXML(xmlfile, modname, swigFile, pyFile):
                 addWX = True
                
 
-        if doRename:
+        if doRename and name:
             old = new = name
             if old.startswith('wx') and not old.startswith('wxEVT_'):
                 # remove all wx prefixes except wxEVT_ and write a %rename directive for it