comparison cbackend.js @ 361:06dceff348ea

llcompile now has Hacky support for calling C functions using dl to lookup symbols and almost has support string constants
author Michael Pavone <pavone@retrodev.com>
date Thu, 23 Apr 2015 19:24:20 -0700
parents 7279e21dad68
children 6b5096b07dd5
comparison
equal deleted inserted replaced
360:0b83f15e819d 361:06dceff348ea
982 'snprintf(ret->data, 22+10+4, "cpointer: %p", self->val);', 982 'snprintf(ret->data, 22+10+4, "cpointer: %p", self->val);',
983 'ret->data[22+10+4] = 0;', 983 'ret->data[22+10+4] = 0;',
984 'return (object *)ret;' 984 'return (object *)ret;'
985 ] 985 ]
986 }); 986 });
987 cptr.addMessage('address', {
988 vars: {intret: 'obj_uint64 *'},
989 lines: [
990 'intret = make_object(&obj_uint64_meta, NULL, 0);',
991 'intret->num = (uint64_t)self->val;',
992 'return intret;'
993 ]
994 })
987 return cptr; 995 return cptr;
988 } 996 }
989 997
990 function makeArray() 998 function makeArray()
991 { 999 {