[PATCHv2 22/25] apibuild: Simplify merging of preproc tokens

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Radostin Stoyanov <rstoyanov1@xxxxxxxxx>
---
 docs/apibuild.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/apibuild.py b/docs/apibuild.py
index 98224c7e7..4c8fa5740 100755
--- a/docs/apibuild.py
+++ b/docs/apibuild.py
@@ -478,8 +478,8 @@ class CLexer:
                 # of '#define' we might end up with '#' and 'define'. This
                 # merges them back together
                 if self.tokens[0][1] == "#":
-                    self.tokens[0] = ('preproc', self.tokens[0][1] + self.tokens[1][1])
-                    self.tokens = self.tokens[:1] + self.tokens[2:]
+                    self.tokens[0] = ('preproc', "#" + self.tokens[1][1])
+                    del self.tokens[1]
                 break
             l = len(line)
             if line[0] == '"' or line[0] == "'":
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux