MCPcopy Create free account
hub / github.com/nodejs/node / _FormatAsEnvironmentBlock

Function _FormatAsEnvironmentBlock

tools/gyp/pylib/gyp/msvs_emulation.py:1139–1148  ·  view source on GitHub ↗

Format as an 'environment block' directly suitable for CreateProcess. Briefly this is a list of key=value\0, terminated by an additional \0. See CreateProcess documentation for more details.

(envvar_dict)

Source from the content-addressed store, hash-verified

1137
1138
1139def _FormatAsEnvironmentBlock(envvar_dict):
1140 """Format as an 'environment block' directly suitable for CreateProcess.
1141 Briefly this is a list of key=value\0, terminated by an additional \0. See
1142 CreateProcess documentation for more details."""
1143 block = ""
1144 nul = "\0"
1145 for key, value in envvar_dict.items():
1146 block += key + "=" + value + nul
1147 block += nul
1148 return block
1149
1150
1151def _ExtractCLPath(output_of_where):

Callers 1

GenerateEnvironmentFilesFunction · 0.85

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected