cocoa: fix ffi-use bug
original commit: 279315b582115b7af4ad4821ca5bfb097c53f83b
This commit is contained in:
parent
95048b2dca
commit
27009c62e2
|
@ -112,7 +112,7 @@
|
|||
v
|
||||
#f #f #f)])
|
||||
(unless (zero? r)
|
||||
(error 'file-creator-and-file "lookup failed (~a): ~e"
|
||||
(error 'file-creator-and-type "lookup failed (~a): ~e"
|
||||
r
|
||||
path))))
|
||||
|
||||
|
@ -122,7 +122,7 @@
|
|||
(unless (path-string? path)
|
||||
(raise-type-error 'file-creator-and-type "path string" path))
|
||||
(let ([info (let ([fs (path->fsref path)]
|
||||
[v (cast (malloc 256) _pointer _FSCatalogInfo-pointer)])
|
||||
[v (cast (malloc 256) _pointer (_gcable _FSCatalogInfo-pointer))])
|
||||
(get-info v fs path)
|
||||
(FSCatalogInfo-finderInfo v))])
|
||||
(values (int->str (FileInfo-fileCreator info))
|
||||
|
@ -135,7 +135,7 @@
|
|||
(unless (and (bytes? type) (= 4 (bytes-length type)))
|
||||
(raise-type-error 'file-creator-and-type "bytes string of length 4" type))
|
||||
(let ([fs (path->fsref path)]
|
||||
[v (cast (malloc 256) _pointer _FSCatalogInfo-pointer)])
|
||||
[v (cast (malloc 256) _pointer (_gcable _FSCatalogInfo-pointer))])
|
||||
(get-info v fs path)
|
||||
(let ([info (FSCatalogInfo-finderInfo v)])
|
||||
(set-FileInfo-fileCreator! info (str->int creator))
|
||||
|
@ -144,7 +144,7 @@
|
|||
kFSCatInfoFinderInfo
|
||||
v)])
|
||||
(unless (zero? r)
|
||||
(error 'file-creator-and-file "change failed (~a): ~e"
|
||||
(error 'file-creator-and-type "change failed (~a): ~e"
|
||||
r
|
||||
path))))
|
||||
(void)]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user