summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2010-05-12 19:35:55 +0200
committerJohannes Weiner <hannes@cmpxchg.org>2010-05-12 19:35:55 +0200
commit4787400cf01b0c40de11c401e4f8b72e000a7cc4 (patch)
treeb72f9c875b828cf22503eb684c3cf642e9aae77a
parent576c7110deb6d92f148aa0ce3ca8fc351912ade7 (diff)
type: print plain type name in !repr mode
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
-rw-r--r--sheep/type.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sheep/type.c b/sheep/type.c
index add31bf..a2cae7b 100644
--- a/sheep/type.c
+++ b/sheep/type.c
@@ -94,7 +94,10 @@ static void typeclass_format(sheep_t sheep, struct sheep_strbuf *sb, int repr)
struct sheep_typeclass *class;
class = sheep_data(sheep);
- sheep_strbuf_addf(sb, "#<type '%s'>", class->name);
+ if (repr)
+ sheep_strbuf_addf(sb, "#<type '%s'>", class->name);
+ else
+ sheep_strbuf_add(sb, class->name);
}
const struct sheep_type sheep_typeclass_type = {