diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-13 00:01:28 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-13 00:01:28 +0200 |
commit | a82b6c772089aa46e30c6c89ef48f514294df3cb (patch) | |
tree | e25d9b6fd1fefe8b6ac293a5c0b53293872a8f54 /module/glob.scm | |
parent | Add basic documentation for lens. (diff) | |
parent | Even more documentation. (diff) | |
download | calp-a82b6c772089aa46e30c6c89ef48f514294df3cb.tar.gz calp-a82b6c772089aa46e30c6c89ef48f514294df3cb.tar.xz |
Merge branch 'next' into datarewrite-structures
Diffstat (limited to 'module/glob.scm')
-rw-r--r-- | module/glob.scm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/module/glob.scm b/module/glob.scm index 64f97690..20cb4b1c 100644 --- a/module/glob.scm +++ b/module/glob.scm @@ -16,11 +16,14 @@ (define << ash) (include# "/usr/include/glob.h" define-public) -(define-values (glob% globfree%) - (let ((this (dynamic-link))) - (values - (pointer->procedure int (dynamic-func "glob" this) `(* ,int * *)) - (pointer->procedure void (dynamic-func "globfree" this) '(*))))) +(define lib (dynamic-link)) + +(define glob% + (pointer->procedure int (dynamic-func "glob" lib) + `(* ,int * *))) +(define globfree + (pointer->procedure void (dynamic-func "globfree" lib) + '(*))) (define glob-flags (logior GLOB_MARK GLOB_BRACE GLOB_TILDE_CHECK)) @@ -41,5 +44,5 @@ (ret (map (compose pointer->string make-pointer) (bytevector->uint-list strvec (native-endianness) (sizeof '*))))) - (globfree% (bytevector->pointer bv)) + (globfree (bytevector->pointer bv)) ret)))) |