Skip to content

Instantly share code, notes, and snippets.

View hanxi's full-sized avatar
:octocat:
Happy Coding!!!

涵曦 hanxi

:octocat:
Happy Coding!!!
View GitHub Profile
@hanxi
hanxi / sslice.c
Created August 16, 2014 09:13 — forked from cloudwu/sslice.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct sslice {
const char *ptr;
size_t sz;
};
int
@hanxi
hanxi / deepcopy.lua
Created September 29, 2013 03:55 — forked from Deco/deepcopy.lua
--[[ deepcopy.lua
Deep-copy function for Lua - v0.2
==============================
- Does not overflow the stack.
- Maintains cyclic-references
- Copies metatables
- Maintains common upvalues between copied functions (for Lua 5.2 only)
TODO