Mercurial > pub > dyncall > bindings
comparison lua/luadyncall/test/test_stdlib.lua @ 0:0cfcc391201f
initial from svn dyncall-1745
author | Daniel Adler |
---|---|
date | Thu, 19 Mar 2015 22:26:28 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0cfcc391201f |
---|---|
1 require "dynport" | |
2 dynport("stdlib") | |
3 | |
4 function checkmalloc(size) | |
5 local ptr = malloc(size) | |
6 if ptr == NULL then | |
7 print("FAILED") | |
8 else | |
9 print("SUCCESS",ptr) | |
10 end | |
11 end | |
12 checkmalloc(-1) | |
13 checkmalloc(0) | |
14 checkmalloc(10) | |
15 | |
16 |