take advantage of pprint-prefix in c-object-pointer prettyprinters
parent
3ea364bc80
commit
79be927371
|
@ -28,11 +28,7 @@ IN: classes.struct.prettyprint
|
|||
[ [ \ S{ ] dip [ class ] [ struct>assoc ] bi \ } (pprint-tuple) ] ?pprint-tuple ;
|
||||
|
||||
: pprint-struct-pointer ( struct -- )
|
||||
<block
|
||||
\ S@ pprint-word
|
||||
[ class pprint-word ]
|
||||
[ >c-ptr pprint* ] bi
|
||||
block> ;
|
||||
\ S@ [ [ class pprint-word ] [ >c-ptr pprint* ] bi ] pprint-prefix ;
|
||||
|
||||
PRIVATE>
|
||||
|
||||
|
|
|
@ -9,10 +9,7 @@ IN: specialized-arrays.direct.functor
|
|||
<PRIVATE
|
||||
|
||||
: pprint-direct-array ( direct-array tag -- )
|
||||
<block
|
||||
pprint-word
|
||||
[ underlying>> ] [ length>> ] bi [ pprint* ] bi@
|
||||
block> ;
|
||||
[ [ underlying>> ] [ length>> ] bi [ pprint* ] bi@ ] pprint-prefix ;
|
||||
|
||||
PRIVATE>
|
||||
|
||||
|
|
|
@ -10,10 +10,9 @@ M: struct-array >pprint-sequence
|
|||
[ >array ] [ class>> ] bi prefix ;
|
||||
|
||||
: pprint-struct-array-pointer ( struct-array -- )
|
||||
<block
|
||||
\ struct-array@ pprint-word
|
||||
[ class>> ] [ underlying>> ] [ length>> ] tri [ pprint* ] tri@
|
||||
block> ;
|
||||
\ struct-array@
|
||||
[ [ class>> pprint-word ] [ underlying>> pprint* ] [ length>> pprint* ] tri ]
|
||||
pprint-prefix ;
|
||||
|
||||
M: struct-array pprint*
|
||||
[ pprint-object ]
|
||||
|
|
Loading…
Reference in New Issue