This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <dlfcn.h> | |
int main(int argc, char **argv) | |
{ | |
void *dll = dlopen("/home/xandaros/workspace/test/test.so", RTLD_LAZY); | |
void *sym = dlsym(dll, "Test_someInt_closure"); | |
if (sym == NULL) | |
{ | |
printf("Symbol not found!!!\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--@name Downloader | |
--@author Xandaros | |
--@include lib/class.txt | |
--@include lib/util/LinkedList.txt | |
require("lib/Class.txt") | |
require("lib/util/LinkedList.txt") | |
local queue = LinkedList() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--@name Image Loader | |
--@author Xandaros | |
--@include lib/util/lowlevel.txt | |
--@include lib/util/Downloader.txt | |
--@include lib/util/LinkedList.txt | |
require("lib/util/lowlevel.txt") | |
require("lib/util/Downloader.txt") | |
require("lib/util/LinkedList.txt") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--@name JSON Library | |
--@author Xandaros | |
JSON = {} | |
local function parseString(json) | |
local m = json:match("^(%s*\")") | |
if not m then | |
throw("Invalid format") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--@name Class | |
--@author Xandaros | |
--Class library, most recent version can be found here: https://gist.github.com/Xandaros/ea8756e4c4ba00218855 | |
local function callConstructor(class, obj, ...) | |
local meta = getmetatable(class) | |
if meta.__super then | |
if class.superArgs then | |
callConstructor(meta.__super, obj, class.superArgs(...)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require ("von") | |
require ("glon") | |
reserialize("ev_playerinfo.txt") | |
reserialize("ev_userranks.txt") | |
reserialize("ev_globalvars.txt") | |
function reserialize(file) | |
local str = file.Read(file, "DATA") | |
file.Write(file, von.serialize(glon.decode(str))) |