Clean up some bad/missed merges from the alterl merge.
authorDavid Reiss <dreiss@apache.org>
Wed, 11 Jun 2008 01:16:29 +0000 (01:16 +0000)
committerDavid Reiss <dreiss@apache.org>
Wed, 11 Jun 2008 01:16:29 +0000 (01:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666486 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_erl_generator.cc
lib/erl/Makefile
test/py/TestServer.py

index f064ae0..74c673d 100644 (file)
@@ -9,6 +9,7 @@
 #include <sys/types.h>
 #include <sstream>
 #include "t_erl_generator.h"
+#include "platform.h"
 
 using namespace std;
 
@@ -20,7 +21,7 @@ using namespace std;
  */
 void t_erl_generator::init_generator() {
   // Make output directory
-  mkdir(get_out_dir().c_str(), S_IRWXU | S_IRWXG | S_IRWXO);
+  MKDIR(get_out_dir().c_str());
 
   // setup export lines
   export_lines_first_ = true;
@@ -174,6 +175,7 @@ void t_erl_generator::generate_const(t_const* tconst) {
  * validate_types method in main.cc
  */
 string t_erl_generator::render_const_value(t_type* type, t_const_value* value) {
+  type = get_true_type(type);
   std::ostringstream out;
 
   if (type->is_base_type()) {
@@ -290,6 +292,8 @@ string t_erl_generator::render_const_value(t_type* type, t_const_value* value) {
       out << render_const_value(etype, *v_iter);
     }
     out << "]";
+  } else {
+    throw "CANNOT GENERATE CONSTANT FOR TYPE: " + type->get_name();
   }
   return out.str();
 }
index 7c76331..bbfb683 100644 (file)
@@ -8,3 +8,11 @@ all clean docs:
 
 install: all
        echo 'No install target, sorry.'
+
+check: all
+
+distclean: clean
+
+# Hack to make "make dist" work.
+# This should not work, but it appears to.
+distdir:
index bef5409..0247bc2 100755 (executable)
@@ -59,11 +59,6 @@ class TestHandler:
     time.sleep(seconds)
     print 'done sleeping'
 
-  def testAsync(self, seconds):
-    print 'testAsync(%d) => sleeping...' % seconds
-    time.sleep(seconds)
-    print 'done sleeping'
-
 handler = TestHandler()
 processor = ThriftTest.Processor(handler)
 transport = TSocket.TServerSocket(9090)