Fuck you, C, and the flea-bitten, mange-covered, syphilis-ridden horse you
rode in on. svn: r18318
This commit is contained in:
parent
60b6c81f9f
commit
af0387e3a6
|
@ -211,6 +211,9 @@
|
|||
|
||||
(define-values (prop:unwrap object-unwrapper)
|
||||
(let-values ([(prop:unwrap pred acc) (make-struct-type-property 'prop:unwrap)])
|
||||
;; Instead of using the accessor if it has prop:unwrap, just use the unwrapper
|
||||
;; from wrapper-object directly, since we know it must be a wrapped object.
|
||||
;; (The accessor will just give us that anyway.)
|
||||
(values prop:unwrap (λ (o) (if (pred o) (wrapper-object-wrapped o) o)))))
|
||||
|
||||
;;--------------------------------------------------------------------
|
||||
|
|
|
@ -463,7 +463,7 @@ int objscheme_is_a(Scheme_Object *o, Scheme_Object *c)
|
|||
Scheme_Object *objscheme_unwrap(Scheme_Object *obj, Scheme_Object *c)
|
||||
{
|
||||
Scheme_Object *s[1], *unwrapper, *unwrap_prop;
|
||||
Scheme_Class *cls = (Scheme_Class *)cls;
|
||||
Scheme_Class *cls = (Scheme_Class *)c;
|
||||
|
||||
if (!obj || !cls)
|
||||
return NULL;
|
||||
|
@ -471,6 +471,7 @@ Scheme_Object *objscheme_unwrap(Scheme_Object *obj, Scheme_Object *c)
|
|||
unwrap_prop = cls->unwrap_property;
|
||||
if(!unwrap_prop)
|
||||
return obj;
|
||||
|
||||
unwrapper = scheme_struct_type_property_ref(unwrap_prop, (Scheme_Object *)obj);
|
||||
if (!unwrapper)
|
||||
return obj;
|
||||
|
|
Loading…
Reference in New Issue
Block a user