fine-tune typechecking index entry
svn: r12920 original commit: ec600c59bb9caa15f10fb68844677e56a4ce86dc
This commit is contained in:
parent
90abe67ff6
commit
000fe5277f
|
@ -677,9 +677,11 @@
|
|||
[(_ x ...) (begin (set! xs (syntax->list #'(x ...))) (do-fun))]))
|
||||
|
||||
(define (function-ptr p fun-ctype)
|
||||
(if (cpointer? p)
|
||||
(if (or (cpointer? p) (procedure? p))
|
||||
(if (eq? (ctype->layout fun-ctype) 'fpointer)
|
||||
((ctype-c->scheme fun-ctype) p)
|
||||
(if (procedure? p)
|
||||
((ctype-scheme->c fun-ctype) p)
|
||||
((ctype-c->scheme fun-ctype) p))
|
||||
(raise-type-error 'function-ptr "function ctype" fun-ctype))
|
||||
(raise-type-error 'function-ptr "cpointer" p)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user