Mercurial > repos > tabletprog
diff modules/bytearray.tp @ 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 | ff7ea11b4b60 |
children | 0673ccbc7379 |
line wrap: on
line diff
--- a/modules/bytearray.tp Tue Apr 21 09:00:56 2015 -0700 +++ b/modules/bytearray.tp Thu Apr 23 19:24:20 2015 -0700 @@ -119,6 +119,15 @@ mprotect: buffer bytes (PROT_READ or PROT_WRITE or PROT_EXEC) self } + + llMessage: _buf_ptr withVars: { + ptrret <- cpointer ptr + } andCode: { + ptrret <- make_object: (addr_of: cpointer_meta) NULL 0 + ptrret val!: buffer + ptrret + } + llMessage: length withVars: { intret <- obj_int32 ptr } andCode: {