NET_CompareAddresses(3)
π NET_CompareAddresses(3) π
okay bestie, welcome to the NET_CompareAddresses page β it's a section 3 joint from the SDL_net3 functions lineup, and honestly? it's a little bop. π
β¨ NAME β¨
NET_CompareAddresses β compare two NET_Address objects, no cap. π
β¨ SYNOPSIS β¨
#include <SDL3_net/SDL_net.h>
int NET_CompareAddresses(const NET_Address *a, const NET_Address *b);
β¨ DESCRIPTION β¨
so what does this icon actually do? it compares two addresses, periodt. and the value it hands back is literally built to be useful for qsort (or SDL_qsort). π¦
like, that's the whole vibe β it's your sort-friendly little comparison function. πΈ
β¨ FUNCTION PARAMETERS β¨
aβ the first address you're comparing. one half of the showdown. πbβ the second address you're comparing. the other half. π«Ά
β¨ RETURN VALUE β¨
- a value less than zero if
ais "less than"b - a value greater than zero if
ais "greater than"b - zero if they're equal πβ¨
that's it, that's the tea. classic three-way compare, the way qsort likes it. π₯
β¨ THREAD SAFETY β¨
good news bestie: it is safe to call this function from any thread. no stress, no drama, go off. π
β¨ AVAILABILITY β¨
this function has been available since SDL_net 3.0.0. it's been here, it's been iconic. β
reminder: this is NET_CompareAddresses(3), from the SDL_net manual β documented at version SDL_net 3.2.0. mwah, go sort something pretty πππ
π¦ where this page comes from
- fedora 43: SDL3_net-devel 3.2.0-2.fc43 Β· Zlib
- fedora 43: SDL3_net-devel 3.2.0-2.fc43 Β· Zlib
- fedora 44: SDL3_net-devel 3.2.0-2.fc44 Β· Zlib
- fedora 44: SDL3_net-devel 3.2.0-2.fc44 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms