NE_VERSION_MATCH(3)

πŸ’– NE_VERSION_MATCH(3) β€” neon API reference, bestie! πŸ’–

okay so this page is all about library versioning, and it lives in the neon API reference as page NE_VERSION_MATCH(3). The stars are ne_version_match, ne_version_string, and ne_version_library. Slay. πŸŽ€


🌸 NAME 🌸

ne_version_match, ne_version_string, ne_version_library β€” library versioning. periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ne_utils.h>

int ne_version_match(int major, int minor);

const char *ne_version_string(void);

const char *ne_version_library(void);

✨ DESCRIPTION ✨

okay so ne_version_match returns zero if the library version is backwards-compatible with the version given in the major and minor parameters. that's the whole vibe check. 🫢

ne_version_string returns a string giving the library version and build information. iconic. πŸ’–

ne_version_library returns a string giving the library version number alone, for example "0.37.0". no cap. πŸ¦‹


πŸ“ EXAMPLES πŸ“

bestie, say you want to require a version of neon which is backwards-compatible with version 1.2.0 β€” you'd do this:

if (ne_version_match(1, 2)) {
    printf("Library version out of date: 1.2 required, found %s.",
           ne_version_string());
    exit(1);
}

πŸŽ€ HISTORY πŸŽ€

ne_version_library is available in neon 0.37.0 and later. noted, bestie. πŸ“βœ¨


Copyright Β© 2001-2026 Joe Orton


πŸ“ source: neon Β· version/date: 03/20/2026 Β· page: NE_VERSION_MATCH(3) β€” mwah, bye bestie! πŸ’‹

πŸ“¦ where this page comes from