MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / data_to_string

Function data_to_string

tools/extract_metadata.py:184–194  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

182
183
184def data_to_string(data):
185 data = data.decode('utf8')
186 # We have at least one test (test/core/test_utf8.c) that uses a double
187 # backslash in the C++ source code, in order to represent a single backslash.
188 # This is because these strings historically were written and read back via
189 # JSON and a single slash is interpreted as an escape char there.
190 # Technically this escaping is no longer needed and could be removed
191 # but in order to maintain compatibility we strip out the double
192 # slashes here.
193 data = data.replace('\\\\', '\\')
194 return data
195
196
197def get_section_strings(module, export_map, section_name):

Callers 2

get_section_stringsFunction · 0.85
get_string_atFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected