ffi/unsafe/objc: fix selector definition lifting
The code intended to lift each selector only once (per lifting context) was broken.
This commit is contained in:
parent
c137b44a68
commit
e5e6d097be
|
@ -390,10 +390,11 @@
|
|||
(define-for-syntax method-sels (make-hash))
|
||||
|
||||
(define-for-syntax (register-selector sym)
|
||||
(or (hash-ref method-sels (cons (syntax-local-lift-context) sym) #f)
|
||||
(define key (cons (syntax-local-lift-context) sym))
|
||||
(or (hash-ref method-sels key #f)
|
||||
(let ([id (syntax-local-lift-expression
|
||||
#`(sel_registerName #,(symbol->string sym)))])
|
||||
(hash-set! method-sels sym id)
|
||||
(hash-set! method-sels key id)
|
||||
id)))
|
||||
|
||||
(provide selector)
|
||||
|
|
Loading…
Reference in New Issue
Block a user