2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-25 11:19:52 +01:00

re_cpp matches are never empty

This commit is contained in:
Thomas Nagy 2016-03-27 19:25:12 +02:00
parent 51b68cf13b
commit 6579592065
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
2 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,11 @@
#if A
const char* c = "foo /*";
#if B
const char* d = " bar */";
// /*
#if C
// */
#include "a.h"
#else
#include "b.h"

View File

@ -138,7 +138,7 @@ skipped = 's'
def repl(m):
"""Replace function used with :py:attr:`waflib.Tools.c_preproc.re_cpp`"""
s = m.group(0)
if s.startswith('/'):
if s[0] == '/':
return ' '
return s