MCPcopy Index your code
hub / github.com/nodejs/node / PathToGuardMacro

Function PathToGuardMacro

deps/v8/PRESUBMIT.py:299–304  ·  view source on GitHub ↗

Guards should be of the form V8_PATH_TO_FILE_WITHOUT_SRC_H_.

(path)

Source from the content-addressed store, hash-verified

297 dash_dot_slash_pattern = input_api.re.compile(r'[-.\\\/]')
298
299 def PathToGuardMacro(path):
300 """Guards should be of the form V8_PATH_TO_FILE_WITHOUT_SRC_H_."""
301 x = input_api.re.sub(leading_src_pattern, 'v8_', path)
302 x = input_api.re.sub(dash_dot_slash_pattern, '_', x)
303 x = x.upper() + "_"
304 return x
305
306 problems = []
307 for f in input_api.AffectedSourceFiles(FilterFile):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…