https://bitbucket.org/daniel_fort/magic-lantern
Raw File
Tip revision: ae3f2a30843444d596f11a60cf5f15a6dc991382 authored by a1ex on 22 October 2013, 21:26:58 UTC
Close branch ppluciennik/makefile_zip_fixes.
Tip revision: ae3f2a3
tinypy-desktop.c
#include <stdio.h>
#include <sys/stat.h>

#define tcc_mallocz(x) calloc((x),1)
#define tcc_realloc(x,y) realloc(x,y)
#define tcc_free(x) free(x)

int GetFileSize(const char* fname)
{
    struct stat s;
    stat(fname, &s);
    return s.st_size;
}

#include "tinypy.c"

int main(int argc, char *argv[]) {
    tp_vm *tp = tp_init(argc, argv);
    tp_ez_call(tp,"py2bc","tinypy",tp_None);
    tp_deinit(tp);
    return(0);
}

/**/
back to top