diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-12-28 20:08:50 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-12-28 20:08:50 +0100 |
commit | 088f9663baf76b2da33446158b02b3a03b316ec7 (patch) | |
tree | 991b4431dc8f65494d7f4b8f39dde3ac8e3f004d | |
parent | eb8993d1c1150cd6523bc414edef4b8d54b9f844 (diff) |
Add note about nproc() memory allocation
-rw-r--r-- | cbs.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -165,7 +165,11 @@ static int nproc(void); This function returns true on success and false if pkg-config is not found on the system. To check for pkg-configs existance without doing anything meaningful, you can call this function with flags set to 0 and lib set to a - VALID library name. */ + VALID library name. + + The arguments this function appends to the given command are heap-allocated. + If you care about free()ing them, you can figure out their indicies in + cmd.argv by getting cmd.len both before- and after calling this function. */ static bool pcquery(struct cmd *, char *lib, int flags); enum pkg_config_flags { PKGC_LIBS = 1 << 0, |