From 4e2fd00791c2909ca37e89b2ed3b7a4b6f691082 Mon Sep 17 00:00:00 2001 From: Teddy Date: Sun, 18 Aug 2013 12:30:04 +0800 Subject: fflush in display --- Makefile | 2 +- builtin.cpp | 1 + types.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2558d7b..1d2a677 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ $(BUILD_DIR): mkdir -p $(BUILD_DIR) $(BUILD_DIR)/%.o : %.cpp - $(CXX) -o $@ -c $< -Wall + $(CXX) -o $@ -c $< -Wall clean: rm -rf $(BUILD_DIR) diff --git a/builtin.cpp b/builtin.cpp index 1061478..5e7bc4a 100644 --- a/builtin.cpp +++ b/builtin.cpp @@ -1600,5 +1600,6 @@ BUILTIN_PROC_DEF(set_gc_resolve_threshold) { BUILTIN_PROC_DEF(display) { ARGS_EXACTLY_ONE; printf("%s", args->car->ext_repr().c_str()); + fflush(stdout); return unspec_obj; } diff --git a/types.h b/types.h index ba593ac..327288d 100644 --- a/types.h +++ b/types.h @@ -74,6 +74,7 @@ class ReprCons {/*{{{*/ string repr; /** The constructor */ ReprCons(bool prim, EvalObj *ori = NULL); + ~ReprCons() {} /** This function is called to get the next component in a complex * EvalObj * @param prev Feed the string form of the previous component */ -- cgit v1.2.3