this repo has no description
C 77.5%
Just 22.5%
2 1 0

Clone this repository

https://tangled.org/zachshipko.com/local.h https://tangled.org/did:plc:gvjre7emtreh5bdqtfwle6j2/local.h
git@knot.tangled.wizardry.systems:zachshipko.com/local.h git@knot.tangled.wizardry.systems:did:plc:gvjre7emtreh5bdqtfwle6j2/local.h

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

local.h#

A small header-only C library that wraps __attribute__((cleanup(...))) to provide a nice interface for automatic destructors.

Usage#

#include <local.h>

int main(void) {
  local int *data = malloc(sizeof(int) * 64);
  ...
}

To specify the cleanup function:

  local_(free) int *data = malloc(sizeof(int) * 64);