• Stars
    star
    224
  • Rank 177,792 (Top 4 %)
  • Language
    C
  • License
    MIT License
  • Created almost 5 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Defer statement for C
This library implements a 'Defer' statement in c, allowing statements to run at
function return time, generally to do cleanup.  It is similar to 'defer' in Go
and to 'scope(exit)' in D, but note that it does not care about lexical scopes.
Integrating it into your codebase is simple; see demo.c for example usage.

Note: this is likely to be noticeably faster with compilers that support the GNU
C extensions; if you are on windows and performance is something you care about,
try Clang or MinGW.

Note: at the moment, a maximum of 32 deferred statements per function is
supported.  To change this number, #define DEFER_MAX_DEFERRED_STATEMENTS to a
different value before including defer.h (or via a compiler flag).

More Repositories

1

Two_Kilo

Two Kilo—fully functional texteditor in 2 kb of C
C
13
star
2

j

various toys in j
J
12
star
3

bearlibterminal-dlang

A BearLibTerminal wrapper for D
D
11
star
4

gorilla-audio

Simple, cross-platform audio library.
C
10
star
5

fancy-memset

small, fast memset based on microsoft's design
Assembly
10
star
6

slashem9

slashem
C
9
star
7

loop

Loop implementation for scheme
Scheme
7
star
8

lrogue2

Updated version of lrogue
C
6
star
9

openfmod

partial reimplementation of fmod
C
6
star
10

meow64

like wow64, but not really, and also for macos
Common Lisp
5
star
11

libeftpad

The best the JavaScript ecosystem has to offer, in C!
C
4
star
12

dungeoncrawl

Fork of Linley's dungeon crawl
C++
3
star
13

v

text editor with higher-order functions
C
3
star
14

fancy-memcmp

small, fast memcmp
Assembly
3
star
15

ats-freestanding

Headers to run ATS code on bare metal with no dependencies.
C
3
star
16

svcl

sbcl with big vectors
Common Lisp
2
star
17

ares

near's multi-system emulator
C++
2
star
18

ttyrec2video

Automatically convert ttyrecs to video format, and optionally upload them to youtube. Based on jettyplay
Java
2
star
19

fancybuild

build system
Common Lisp
1
star
20

nethack-360-esm

NetHack 3.6.0, with some of the "3.4.3-NAO" improvements. Playable at em.slashem.me
C
1
star
21

fsb-extract-dumb

C
1
star
22

SEProxy

Stack exchange chat proxy+apl evaluator
Raku
1
star
23

rogomatic

Automatically exported from code.google.com/p/rogomatic
C
1
star
24

Glarkum

OpenGL loader for raku
Raku
1
star
25

libmarshal

Mirror of I-Jui Sung's matrix transposition library
C++
1
star
26

cyclonic

WIP port of cyclone to modern platforms
C
1
star