diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2005-01-09 13:44:53 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2005-01-09 13:44:53 +0000 |
| commit | 39ce94d79f42529d4b6bac0d184245416e3fdb87 (patch) | |
| tree | 4f94293ba583cde5bfc0c21d6e1688d786e5dc68 | |
| parent | 35e3d811cd17ad973ea4719382a6a7d0f879e865 (diff) | |
| download | lasso-39ce94d79f42529d4b6bac0d184245416e3fdb87.tar.gz lasso-39ce94d79f42529d4b6bac0d184245416e3fdb87.tar.xz lasso-39ce94d79f42529d4b6bac0d184245416e3fdb87.zip | |
deals with lines ending with \; compile regex only once.
| -rw-r--r-- | lasso/extract_symbols.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lasso/extract_symbols.py b/lasso/extract_symbols.py index 0f826d61..05c4df33 100644 --- a/lasso/extract_symbols.py +++ b/lasso/extract_symbols.py @@ -9,9 +9,11 @@ if len(sys.argv) == 2: else: srcdir = '.' +regex = re.compile('LASSO_EXPORT.*(lasso_[a-zA-Z0-9_]+).*\(') + symbols = [] for header_file in glob.glob('%s/*/*.h' % srcdir) + glob.glob('%s/*.h' % srcdir): - symbols.extend(re.findall('LASSO_EXPORT.*(lasso_[a-zA-Z0-9_]+).*\(', file(header_file).read())) + symbols.extend(regex.findall(file(header_file).read().replace('\\\n', ''))) for s in symbols: print s |
