Skip to content

Instantly share code, notes, and snippets.

@ShopifyEng
Last active Nov 11, 2022
Embed
What would you like to do?
Caching Without Marshal Part 1 - marshal.c.txt
#define MARSHAL_MAJOR 4 #define TYPE_STRING '"'
#define MARSHAL_MINOR 8 #define TYPE_REGEXP '/'
#define TYPE_NIL '0' #define TYPE_ARRAY '['
#define TYPE_TRUE 'T' #define TYPE_HASH '{'
#define TYPE_FALSE 'F' #define TYPE_HASH_DEF '}'
#define TYPE_FIXNUM 'i' #define TYPE_STRUCT 'S'
#define TYPE_BIGNUM 'l' #define TYPE_OBJECT 'o'
#define TYPE_FLOAT 'f'
#define TYPE_SYMBOL ':' #define TYPE_IVAR 'I'
#define TYPE_UCLASS 'C'
#define TYPE_CLASS 'c' #define TYPE_EXTENDED 'e'
#define TYPE_MODULE 'm'
#define TYPE_USERDEF 'u'
#define TYPE_LINK '@' #define TYPE_USRMARSHAL 'U'
#define TYPE_SYMLINK ';'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment