]> www.ginac.de Git - ginac.git/commitdiff
* introduced typedef propinfovector in order to please Cint.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Tue, 10 Apr 2001 13:47:03 +0000 (13:47 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Tue, 10 Apr 2001 13:47:03 +0000 (13:47 +0000)
ginac/archive.cpp
ginac/archive.h

index 43b2667cac1c9e0b80c59df913f516726820da6b..3ce4ec6590a4fef154a209390b2e86c0c7057656 100644 (file)
@@ -457,7 +457,7 @@ const archive_node &archive_node::find_ex_node(const std::string &name, unsigned
 }
 
 
-void archive_node::get_properties(std::vector<archive_node::property_info> &v) const
+void archive_node::get_properties(propinfovector &v) const
 {
        v.clear();
        std::vector<property>::const_iterator i = props.begin(), iend = props.end();
@@ -465,7 +465,7 @@ void archive_node::get_properties(std::vector<archive_node::property_info> &v) c
                property_type type = i->type;
                string name = a.unatomize(i->name);
 
-               std::vector<property_info>::iterator a = v.begin(), aend = v.end();
+               propinfovector::iterator a = v.begin(), aend = v.end();
                bool found = false;
                while (a != aend) {
                        if (a->type == type && a->name == name) {
index c5030eb5a6083b541b7f0d55838da3668e015928..96a6ea1c639f48c6ef24a29c79c2667515a6c909 100644 (file)
@@ -74,6 +74,13 @@ public:
                std::string name;   /**< Name of property. */
                unsigned count;     /**< Number of occurrences. */
        };
+       // Cint doesn't like vector<..,default_alloc> but malloc_alloc is
+       // unstandardized and not supported by newer GCCs.
+#if defined(__GNUC__) && ((__GNUC__ == 2) && (__GNUC_MINOR__ < 97))
+       typedef std::vector<property_info,malloc_alloc> propinfovector;
+#else
+       typedef std::vector<ex> propinfovector;
+#endif
 
        archive_node() : a(*dummy_ar_creator()), has_expression(false) {} // hack for cint which always requires a default constructor
        archive_node(archive &ar) : a(ar), has_expression(false) {}
@@ -116,7 +123,7 @@ public:
        const archive_node &find_ex_node(const std::string &name, unsigned int index = 0) const;
 
        /** Return vector of properties stored in node. */
-       void get_properties(std::vector<property_info> &v) const;
+       void get_properties(propinfovector &v) const;
 
        ex unarchive(const lst &sym_lst) const;
        bool has_same_ex_as(const archive_node &other) const;