Ignore:
Timestamp:
Nov 13, 2013, 1:00:56 PM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
d3066e2
Parents:
54e74f0
Message:

waf, waflib: update to 1.7.13

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waflib/Tools/c_preproc.py

    r54e74f0 rc101fe1  
    2222re_pragma_once=re.compile('^\s*once\s*',re.IGNORECASE)
    2323re_nl=re.compile('\\\\\r*\n',re.MULTILINE)
    24 re_cpp=re.compile(r"""(/\*[^*]*\*+([^/*][^*]*\*+)*/)|//[^\n]*|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)""",re.MULTILINE)
     24re_cpp=re.compile(r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',re.DOTALL|re.MULTILINE)
    2525trig_def=[('??'+a,b)for a,b in zip("=-/!'()<>",r'#~\|^[]{}')]
    2626chr_esc={'0':0,'a':7,'b':8,'t':9,'n':10,'f':11,'v':12,'r':13,'\\':92,"'":39}
     
    3838skipped='s'
    3939def repl(m):
    40         s=m.group(1)
    41         if s:
     40        s=m.group(0)
     41        if s.startswith('/'):
    4242                return' '
    43         return m.group(3)or''
     43        return s
    4444def filter_comments(filename):
    4545        code=Utils.readf(filename)
     
    476476                                break
    477477                        found=self.cached_find_resource(n,filename)
    478                 if found:
     478                if found and not found in self.ban_includes:
    479479                        self.nodes.append(found)
    480480                        if filename[-4:]!='.moc':
     
    519519                        bld.parse_cache={}
    520520                        self.parse_cache=bld.parse_cache
     521                self.current_file=node
    521522                self.addlines(node)
    522523                if env['DEFINES']:
     
    558559                                elif token=='include'or token=='import':
    559560                                        (kind,inc)=extract_include(line,self.defs)
    560                                         if inc in self.ban_includes:
    561                                                 continue
    562                                         if token=='import':self.ban_includes.add(inc)
    563561                                        if ve:debug('preproc: include found %s    (%s) ',inc,kind)
    564562                                        if kind=='"'or not strict_quotes:
    565                                                 self.tryfind(inc)
     563                                                self.current_file=self.tryfind(inc)
     564                                                if token=='import':
     565                                                        self.ban_includes.add(self.current_file)
    566566                                elif token=='elif':
    567567                                        if state[-1]==accepted:
     
    584584                                elif token=='pragma':
    585585                                        if re_pragma_once.match(line.lower()):
    586                                                 self.ban_includes.add(self.curfile)
     586                                                self.ban_includes.add(self.current_file)
    587587                        except Exception ,e:
    588588                                if Logs.verbose:
Note: See TracChangeset for help on using the changeset viewer.