]> xenbits.xensource.com Git - libvirt.git/commitdiff
apibuild: Add index.warning() method
authorAndrea Bolognani <abologna@redhat.com>
Mon, 25 Apr 2016 12:23:04 +0000 (14:23 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 26 Apr 2016 07:20:12 +0000 (09:20 +0200)
This method is used in eg. index.merge(), but is not defined
anywhere. The implementation has been copied from docBuilder.

docs/apibuild.py

index 648036ff58f7285c4faf2360b172f2646e193c9e..b1a9d4181261b0b813a8334206264c26ff2f2a04 100755 (executable)
@@ -240,6 +240,11 @@ class index:
         self.references = {}
         self.info = {}
 
+    def warning(self, msg):
+        global warnings
+        warnings = warnings + 1
+        print msg
+
     def add_ref(self, name, header, module, static, type, lineno, info=None, extra=None, conditionals = None):
         if name[0:2] == '__':
             return None