summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/kernel/element.hpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-01-02 10:27:26 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-01-02 10:27:26 +0000
commit95fa76f5f3208d913320c13a05171ecdcd7134c2 (patch)
tree872e101cd2fb1505baf313940e48c6b615fd6725 /sca-cpp/trunk/kernel/element.hpp
parent1d04916fda43146fb62488c20ba03b7b3006c8e9 (diff)
Performance improvements when running both in multi-threaded and pre-forked HTTPD. Changed memory management to use Apache APR pools instead of ref counting pointers as it's much faster and easier to integrate with the Python and Ruby interpreters. Changed to use simple pool-based string and stream implementations instead of the STL ones, which cause a lots of mutex locks in a multi-threaded environment. Added build options to compile with threading and profiling.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@895165 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/kernel/element.hpp')
-rw-r--r--sca-cpp/trunk/kernel/element.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sca-cpp/trunk/kernel/element.hpp b/sca-cpp/trunk/kernel/element.hpp
index 612752d1df..4570110e96 100644
--- a/sca-cpp/trunk/kernel/element.hpp
+++ b/sca-cpp/trunk/kernel/element.hpp
@@ -98,7 +98,7 @@ const value elementHasValue(const list<value>& l) {
const list<value> r = reverse(l);
if (isSymbol(car(r)))
return false;
- if(isList(car(r)) && isSymbol(car<value>(car(r))))
+ if(isList(car(r)) && !isNil((list<value>)car(r)) && isSymbol(car<value>(car(r))))
return false;
return true;
}
@@ -201,7 +201,7 @@ const value valueToElement(const value& t) {
return mklist(element, n, v);
// Convert a list value
- if (!isSymbol(car<value>(v)))
+ if (isNil((list<value>)v) || !isSymbol(car<value>(v)))
return cons(element, cons(n, mklist<value>(valuesToElements(v))));
// Convert a nested name value pair value