Skip to content

Instantly share code, notes, and snippets.

View TheFox's full-sized avatar

Christian Mayer TheFox

View GitHub Profile
@TheFox
TheFox / call_category_loads.c
Last active August 29, 2015 14:15
Objc call_category_loads
// Original: http://www.opensource.apple.com/source/objc4/objc4-646/runtime/objc-loadmethod.mm
static BOOL call_category_loads(void){
// ...
int used = loadable_categories_used;
// ...
loadable_categories_used = 0;
// ...
new_categories_added = (loadable_categories_used > 0);
@TheFox
TheFox / tree.zig
Last active March 27, 2025 16:19
Zig Error
// Using Zig 0.14.0
pub const Node = struct {
allocator: Allocator,
children: ArrayList(Node),
parent: ?*Node,
max_level: usize,
...
pub fn init(allocator: Allocator, value: u8, level: usize) Node {