summaryrefslogtreecommitdiff
path: root/ACE/ace/Obstack_T.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2006-08-16 10:18:47 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2006-08-16 10:18:47 +0000
commit651e5ffc35dae313c23c0d63fd14cc4e7c372d9b (patch)
treeec35a7ae9e6f0b454e9518790f9535f6c2e6172a /ACE/ace/Obstack_T.cpp
parentea23b503dda71d52dfa1025832d331d0a44b75dd (diff)
downloadATCD-651e5ffc35dae313c23c0d63fd14cc4e7c372d9b.tar.gz
Wed Aug 16 10:18:41 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace/Obstack_T.cpp')
-rw-r--r--ACE/ace/Obstack_T.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/ACE/ace/Obstack_T.cpp b/ACE/ace/Obstack_T.cpp
index f7b781eee21..4bea0e431a5 100644
--- a/ACE/ace/Obstack_T.cpp
+++ b/ACE/ace/Obstack_T.cpp
@@ -203,6 +203,24 @@ ACE_Obstack_T<CHAR>::release (void)
this->curr_->block_ = this->curr_->cur_ = this->curr_->contents_;
}
+template <class CHAR> void
+ACE_Obstack_T<CHAR>::grow_fast (CHAR c)
+{
+ * (reinterpret_cast<CHAR *> (this->curr_->cur_)) = c;
+ this->curr_->cur_ += sizeof (CHAR);
+}
+
+template <class CHAR> CHAR *
+ACE_Obstack_T<CHAR>::freeze (void)
+{
+ CHAR *retv = reinterpret_cast<CHAR *> (this->curr_->block_);
+ * (reinterpret_cast<CHAR *> (this->curr_->cur_)) = 0;
+
+ this->curr_->cur_ += sizeof (CHAR);
+ this->curr_->block_ = this->curr_->cur_;
+ return retv;
+}
+
ACE_END_VERSIONED_NAMESPACE_DECL
#endif /* ACE_OBSTACK_T_CPP */