What is Nostr?
gentoobro /
npub1hap…jkkv
2024-09-03 04:48:26
in reply to nevent1q…fn5x

gentoobro on Nostr: The standard library avoids memory allocation in general. Even strdup is a ...

The standard library avoids memory allocation in general. Even strdup is a non-standard extension. It is not safe to assume that the developer is using malloc, or how he is allocating memory. Therefore, any function which needs variable-sized memory is left as an exercise to the reader (which should be trivial and just included in your own general purpose library).

There are a variety of general helper libraries out there. Feel free to use mine:
https://notabug.org/yzziizzy/sti
https://github.com/yzziizzy/sti
Author Public Key
npub1hap4f3j40p06jdjde9yeh5k85sdvhw4p00mh3kthnq744j9y8zcsuvjkkv