From 2805097d61d81c92473f3b8e519230b1b23c9fd5 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 4 Jun 2009 17:33:45 +0200 Subject: utils/migrate-0.8.py: Handle constants in the apt_pkg extension. --- utils/migrate-0.8.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/utils/migrate-0.8.py b/utils/migrate-0.8.py index 61d3865a..dc919e1d 100755 --- a/utils/migrate-0.8.py +++ b/utils/migrate-0.8.py @@ -94,6 +94,20 @@ def find_deprecated_cpp(): all_old.add('.' + name) all_old.add(name) line = lines.pop(0) + # Let's handle constants in the apt_pkg module + lines = list(open('python/apt_pkgmodule.cc')) + while lines: + while lines and not 'COMPAT_0_7' in line: + line = lines.pop(0) + if lines: + lines.pop(0) + while lines and not '#endif' in line: + if 'PyModule_Add' in line: + name = line.split(",")[1].strip().strip('"') + if name != '_COMPAT_0_7': + all_old.add('.' + name) + all_old.add(name) + line = lines.pop(0) return all_old -- cgit v1.2.3