| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* tests/017/glob-carray.tl (glob-t): Restructure
to case statement. Add padding to struct based on
looking at the glibc definition. Add FFI definition
based on Cygwin header.
* tests/017/glob-zarray.tl (glob-t): Likewise.
|
|
|
|
|
|
|
|
|
| |
* tests/017/glob-carray.tl (glob-t): Initialize reserve
member to 0. Since it doesn't exist on Darwin, it will
stay nil, and change the the test output. A Darwin variant
of the corresponding FFI type is provided.
* tests/017/glob-zarray.tl (glob-t): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The realpath function is called using FFI. One approach
passes a null pointer, so that the function dynamically
allocates. The return value is str-d, causing FFI to take
ownership of the pointer, freeing it. The other approach
is to pass a pointer to a large null-terminated character
array, marked for ownership transfer to the function. FFI
allocates it and puts the argument into it, which is just
a dummy empty string. The function fills that buffer and
returns it. The return is captured as a str-d, so FFI takes
ownership back, and frees the buffer.
* tests/017/realpath.tl: New function.
* tests/017/realpath.expected: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One approach captures the paths as a carray of
strings, and explicitly frees it with globfree.
The other approach uses a zarray, taking advantage
of null termination. globfree is elided because TXR FFI
does the freeing; the types used declare to it that it
is taking ownership of a dynamically allocated vector of
dynamically allocated strings, and so it performs the
equivalent of globfree.
* tests/017/glob-carray.expected: New file.
* tests/017/glob-carray.tl: Likewise.
* tests/017/glob-zarray.expected: Likewise.
* tests/017/glob-zarray.tl: Likewise.
|
|
* tests/017/qsort.expected: New file.
* tests/017/qsort.tl: New file.
* tests/common.tl (libc): New function.
* Makefile (tst/tests/017/%): Clear TXR_DBG_OPTS so the GC
stress test isn't applied to tests in this directory.
|