MCPcopy Create free account
hub / github.com/apache/arrow / generate_encoded_versions

Function generate_encoded_versions

c_glib/tool/generate-version-header.py:105–118  ·  view source on GitHub ↗
(library: str)

Source from the content-addressed store, hash-verified

103
104
105def generate_encoded_versions(library: str) -> str:
106 macros = []
107
108 for major_version, minor_version in ALL_VERSIONS:
109 macros.append(f"""/**
110 * {library}_VERSION_{major_version}_{minor_version}:
111 *
112 * You can use this macro value for compile time API version check.
113 *
114 * Since: {major_version}.{minor_version}.0
115 */
116#define {library}_VERSION_{major_version}_{minor_version} G_ENCODE_VERSION({major_version}, {minor_version})""") # noqa: E501
117
118 return "\n\n".join(macros)
119
120
121def generate_availability_macros(library: str) -> str:

Callers 1

write_headerFunction · 0.85

Calls 2

appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected