Changing contracts on gl-context<%> and applying it to the gl-context% object.
I updated and noticed that this was now failing because interface contracts are not check structurally (any more?). Once I applied the interface, the contract application failed because the documented two additional arguments (alternative and enable-breaks?) are not actually accepted. I look through all the implementations of gl-context% and none of them accept these. Should I change the documentation or is this a bad backwards incompatibility with the older versions?
This commit is contained in:
parent
1d8f5279bd
commit
0da1c82584
|
@ -36,9 +36,15 @@
|
|||
(lambda (v) (loop))))))
|
||||
(define manager-t (thread/suspend-to-kill lock-manager))
|
||||
|
||||
(define gl-context<%>
|
||||
(interface ()
|
||||
[call-as-current (->*m [(-> any)] any)]
|
||||
[ok? (->m boolean?)]
|
||||
[swap-buffers (->m any)]))
|
||||
|
||||
;; Implemented by subclasses:
|
||||
(define gl-context%
|
||||
(class object%
|
||||
(class* object% (gl-context<%>)
|
||||
(define/private (with-gl-lock t)
|
||||
(thread-resume manager-t (current-thread))
|
||||
(if (eq? (current-thread) (channel-get lock-holder-ch))
|
||||
|
@ -67,9 +73,3 @@
|
|||
(define/public (do-swap-buffers t) (void))
|
||||
|
||||
(super-new)))
|
||||
|
||||
(define gl-context<%>
|
||||
(interface ()
|
||||
[call-as-current (->*m [(-> any)] [evt? any/c] any)]
|
||||
[ok? (->m boolean?)]
|
||||
[swap-buffers (->m any)]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user