]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' into new_ui
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 10 Feb 2009 22:53:09 +0000 (16:53 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 10 Feb 2009 22:53:09 +0000 (16:53 -0600)
1  2 
basis/cocoa/messages/messages.factor

index 5234fc6d667f5ecbb5cdbc44b7cab1c794fc11c7,ce66467203ffc52dc76dd44096ac5866d63dce91..71e574a2e5ada2b52d7e5c6d8e1a63bf2908a544
@@@ -1,4 -1,4 +1,4 @@@
 -! Copyright (C) 2006, 2008 Slava Pestov.
 +! Copyright (C) 2006, 2009 Slava Pestov.
  ! See http://factorcode.org/license.txt for BSD license.
  USING: accessors alien alien.c-types alien.strings arrays assocs
  continuations combinators compiler compiler.alien kernel math
@@@ -79,7 -79,7 +79,7 @@@ MACRO: (send) ( selector super? -- quo
  ! Runtime introspection
  SYMBOL: class-init-hooks
  
- class-init-hooks [ H{ } clone or ] initialize
+ class-init-hooks [ H{ } clone ] initialize
  
  : (objc-class) ( name word -- class )
      2dup execute dup [ 2nip ] [
@@@ -167,19 -167,13 +167,19 @@@ assoc-union alien>objc-types set-globa
          drop "void*"
      ] unless ;
  
 +ERROR: no-objc-type name ;
 +
 +: decode-type ( ch -- ctype )
 +    1string dup objc>alien-types get at
 +    [ ] [ no-objc-type ] ?if ;
 +
  : (parse-objc-type) ( i string -- ctype )
      [ [ 1+ ] dip ] [ nth ] 2bi {
          { [ dup "rnNoORV" member? ] [ drop (parse-objc-type) ] }
          { [ dup CHAR: ^ = ] [ 3drop "void*" ] }
          { [ dup CHAR: { = ] [ drop objc-struct-type ] }
          { [ dup CHAR: [ = ] [ 3drop "void*" ] }
 -        [ 2nip 1string objc>alien-types get at ]
 +        [ 2nip decode-type ]
      } cond ;
  
  : parse-objc-type ( string -- ctype ) 0 swap (parse-objc-type) ;