Skip to content

uvhttp_version.c ​

UVHTTP version and build configuration query API implementation.

Functions ​

uvhttp_get_version_string(void) ​

Return Type: const char *

Get UVHTTP version string.

Returns: const char* Version string (e.g., "2.3.0")

Note: This is the same as UVHTTP_VERSION_STRING macro Note: The returned string is statically allocated, do not free it

uvhttp_get_version(int *major, int *minor, int *patch) ​

Return Type: void

Get UVHTTP version components.

Parameters:

  • major: Pointer to store major version (can be NULL)
  • minor: Pointer to store minor version (can be NULL)
  • patch: Pointer to store patch version (can be NULL)

Returns: void

Note: Any NULL pointer will be ignored

uvhttp_get_version_int(void) ​

Return Type: int

Get UVHTTP version as integer.

Returns: int Version as integer (e.g., 20300 for 2.3.0)

Note: Calculated as: major * 10000 + minor * 100 + patch

uvhttp_get_build_info(uvhttp_build_info_t *info) ​

Get complete build information.

Parameters:

  • info: Pointer tostructure to fill (can be NULL)

Returns: uvhttp_error_t UVHTTP_OK on success, error code on failure

Note: If info is NULL, returns UVHTTP_ERROR_INVALID_PARAM Note: The returned structure contains pointers to statically allocated strings, do not free them Note: This function is thread-safe

uvhttp_is_feature_enabled(const char *feature) ​

Return Type: int

Check if a feature is enabled.

Parameters:

  • feature: Feature name to check

Returns: int 1 if enabled, 0 if disabled, -1 if feature name is invalid

Note: Supported feature names:

uvhttp_get_allocator_type(void) ​

Return Type: const char *

Get allocator type name.

Returns: const char* Allocator type name ("system" or "mimalloc")

Note: The returned string is statically allocated, do not free it

uvhttp_get_build_type(void) ​

Return Type: const char *

Get build type.

Returns: const char* Build type ("Debug" or "Release")

Note: The returned string is statically allocated, do not free it

uvhttp_get_compiler_info(void) ​

Return Type: const char *

Get compiler information.

Returns: const char* Compiler information string

Note: Format: "compiler_name version" Note: The returned string is statically allocated, do not free it

uvhttp_get_platform_info(void) ​

Return Type: const char *

Get platform information.

Returns: const char* Platform information string

Note: Format: "os_name architecture" Note: The returned string is statically allocated, do not free it

uvhttp_print_build_info(void) ​

Return Type: void

Print build information to stdout.

Returns: void

Note: Useful for debugging and diagnostics Note: Output format is human-readable

Released under MIT License