summaryrefslogtreecommitdiff
path: root/ndb/src/ndbapi/NdbImpl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src/ndbapi/NdbImpl.hpp')
-rw-r--r--ndb/src/ndbapi/NdbImpl.hpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/ndb/src/ndbapi/NdbImpl.hpp b/ndb/src/ndbapi/NdbImpl.hpp
index ec386074692..dc0a057619f 100644
--- a/ndb/src/ndbapi/NdbImpl.hpp
+++ b/ndb/src/ndbapi/NdbImpl.hpp
@@ -89,6 +89,15 @@ public:
return 0;
}
+/*
+ We need this friend accessor function to work around a HP compiler problem,
+ where template class friends are not working.
+*/
+ static inline void setNdbError(Ndb &ndb,int code){
+ ndb.theError.code = code;
+ return;
+ }
+
/**
* NOTE free lists must be _after_ theNdbObjectIdMap take
* assure that destructors are run in correct order
@@ -208,7 +217,7 @@ Ndb_free_list_t<T>::fill(Ndb* ndb, Uint32 cnt)
m_free_list = new T(ndb);
if (m_free_list == 0)
{
- ndb->theError.code = 4000;
+ NdbImpl::setNdbError(*ndb, 4000);
assert(false);
return -1;
}
@@ -218,7 +227,7 @@ Ndb_free_list_t<T>::fill(Ndb* ndb, Uint32 cnt)
T* obj= new T(ndb);
if(obj == 0)
{
- ndb->theError.code = 4000;
+ NdbImpl::setNdbError(*ndb, 4000);
assert(false);
return -1;
}
@@ -250,7 +259,7 @@ Ndb_free_list_t<T>::seize(Ndb* ndb)
}
else
{
- ndb->theError.code = 4000;
+ NdbImpl::setNdbError(*ndb, 4000);
assert(false);
}
return tmp;