tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r1419987 [5/5] - in /tuscany/sca-cpp/trunk/modules: http/ java/ oauth/ opencl/ python/ server/ server/htdocs/test/ wsgi/
Date Tue, 11 Dec 2012 04:03:35 GMT
Modified: tuscany/sca-cpp/trunk/modules/server/mod-scheme.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-scheme.hpp?rev=1419987&r1=1419986&r2=1419987&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/mod-scheme.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/server/mod-scheme.hpp Tue Dec 11 04:03:29 2012
@@ -49,39 +49,30 @@ const list<value> primitiveProcedures(co
 }
 
 /**
- * Apply a Scheme component implementation function.
- */
-struct applyImplementation {
-    const value impl;
-    const list<value> px;
-
-    applyImplementation(const value& impl, const list<value>& px) : impl(impl),
px(scheme::quotedParameters(primitiveProcedures(px))) {
-    }
-
-    const value operator()(const list<value>& params) const {
-        const value expr = cons<value>(car(params), append(scheme::quotedParameters(cdr(params)),
px));
-        debug(expr, "modeval::scheme::applyImplementation::input");
-        scheme::Env env = scheme::setupEnvironment();
-        const value res = scheme::evalScript(expr, impl, env);
-        const value val = isNil(res)? mklist<value>(value(), string("Could not evaluate
expression")) : mklist<value>(res);
-        debug(val, "modeval::scheme::applyImplementation::result");
-        return val;
-    }
-};
-
-/**
  * Evaluate a Scheme component implementation and convert it to an
  * applicable lambda function.
  */
-const failable<lambda<value(const list<value>&)> > evalImplementation(const
string& path, const value& impl, const list<value>& px) {
-    const string fpath(path + attributeValue("script", impl));
+const failable<lvvlambda > evalImplementation(const string& path, const value&
impl, const list<value>& px) {
+    const string fpath(path + (string)attributeValue("script", impl));
     ifstream is(fpath);
     if (fail(is))
-        return mkfailure<lambda<value(const list<value>&)> >(string("Could
not read implementation: ") + fpath);
+        return mkfailure<lvvlambda >(string("Could not read implementation: ") + fpath);
     const value script = scheme::readScript(is);
     if (isNil(script))
-        return mkfailure<lambda<value(const list<value>&)> >(string("Could
not read implementation: ") + fpath);
-    return lambda<value(const list<value>&)>(applyImplementation(script,
px));
+        return mkfailure<lvvlambda >(string("Could not read implementation: ") + fpath);
+    const list<value> pxproc = scheme::quotedParameters(primitiveProcedures(px));
+
+    const lvvlambda applyImplementation = [script, pxproc](const list<value>& params)
-> const value {
+        // Apply a Scheme component implementation function
+        const value expr = cons<value>(car(params), append(scheme::quotedParameters(cdr(params)),
pxproc));
+        debug(expr, "modeval::scheme::applyImplementation::input");
+        scheme::Env env = scheme::setupEnvironment();
+        const value res = scheme::evalScript(expr, script, env);
+        const value val = isNil(res)? mklist<value>(nilValue, string("Could not evaluate
expression")) : mklist<value>(res);
+        debug(val, "modeval::scheme::applyImplementation::result");
+        return val;
+    };
+    return applyImplementation;
 }
 
 }

Modified: tuscany/sca-cpp/trunk/modules/server/server-conf
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/server-conf?rev=1419987&r1=1419986&r2=1419987&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/server-conf (original)
+++ tuscany/sca-cpp/trunk/modules/server/server-conf Tue Dec 11 04:03:29 2012
@@ -22,6 +22,18 @@ here=`echo "import os; print os.path.rea
 mkdir -p $1
 root=`echo "import os; print os.path.realpath('$1')" | python`
 
+# Configure thread stack size on MacOS X
+uname=`uname -s`
+if [ "$uname" = "Darwin" ]; then
+    cat >>$root/conf/mpm.conf <<EOF
+# Generated by: httpd-conf $*
+# Set thread stack size
+ThreadStackSize 2097152
+
+EOF
+
+fi
+
 # Serve Javascript scripts and CSS
 $here/../js/js-conf $1
 

Modified: tuscany/sca-cpp/trunk/modules/wsgi/Makefile.am
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/Makefile.am?rev=1419987&r1=1419986&r2=1419987&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/wsgi/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/modules/wsgi/Makefile.am Tue Dec 11 04:03:29 2012
@@ -43,7 +43,7 @@ gae.prefix: $(top_builddir)/config.statu
 EXTRA_DIST = domain-test.composite *.py htdocs/test/*.xml htdocs/test/*.txt htdocs/*.html
 
 client_test_SOURCES = client-test.cpp
-client_test_LDFLAGS = -lxml2 -lcurl -lmozjs
+client_test_LDFLAGS = -lxml2 -lcurl -ljansson
 
 noinst_PROGRAMS = client-test
 

Modified: tuscany/sca-cpp/trunk/modules/wsgi/client-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/client-test.cpp?rev=1419987&r1=1419986&r2=1419987&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/wsgi/client-test.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/wsgi/client-test.cpp Tue Dec 11 04:03:29 2012
@@ -27,7 +27,7 @@
 #include "string.hpp"
 #include "../server/client-test.hpp"
 
-int main(const int argc, const char** argv) {
+int main(const int argc, const char** const argv) {
     tuscany::cout << "Testing..." << tuscany::endl;
     tuscany::server::testURI = argc < 2? "http://localhost:8090/wsgi" : argv[1];
     tuscany::server::testBlobs = false;



Mime
View raw message