#include <sys/types.h>
#include <sstream>
#include "t_erl_generator.h"
+#include "platform.h"
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;
* 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()) {
out << render_const_value(etype, *v_iter);
}
out << "]";
+ } else {
+ throw "CANNOT GENERATE CONSTANT FOR TYPE: " + type->get_name();
}
return out.str();
}
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:
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)