aboutsummaryrefslogtreecommitdiff
path: root/odb/details/buffer.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/details/buffer.hxx')
-rw-r--r--odb/details/buffer.hxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/odb/details/buffer.hxx b/odb/details/buffer.hxx
index aec6d42..558be9b 100644
--- a/odb/details/buffer.hxx
+++ b/odb/details/buffer.hxx
@@ -1,5 +1,4 @@
// file : odb/details/buffer.hxx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef ODB_BUFFER_DETAILS_HXX
@@ -65,6 +64,22 @@ namespace odb
{
return static_cast<T*> (data_);
}
+
+ // Note that strictly speaking the return type should be void* const*
+ // but that would make using this function too awkward since we often
+ // store the result as void*.
+ //
+ void**
+ data_ptr ()
+ {
+ return &data_;
+ }
+
+ const void* const*
+ data_ptr () const
+ {
+ return &data_;
+ }
};
typedef basic_buffer<char> buffer;