diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-06-15 10:32:48 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-07-05 14:43:38 +0200 |
commit | 87ffeb79203341a73e7fb33199120b5d1a780370 (patch) | |
tree | 7cce36619a60dfb6d23974227bc54075f99c8c74 | |
parent | e9a4bf1902388ad5d38bb9424b87b007943275c6 (diff) |
Correct size type used in header generation
-rw-r--r-- | odb/relational/pgsql/header.cxx | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/odb/relational/pgsql/header.cxx b/odb/relational/pgsql/header.cxx index 85cc6e5..1915d75 100644 --- a/odb/relational/pgsql/header.cxx +++ b/odb/relational/pgsql/header.cxx @@ -73,17 +73,8 @@ namespace relational // '-' and '.'. // - /* - @@ Disabled. - os << "char " << mi.var << "value[" << - (t.range ? t.range_value : 10) + 3 << "];" - */ - - // @@ Why use unsigned long when length can only be 1002 bytes? - // - os << image_type << " " << mi.var << "value;" - << "unsigned long " << mi.var << "size;" + << "std::size_t " << mi.var << "size;" << "bool " << mi.var << "null;" << endl; } @@ -99,11 +90,8 @@ namespace relational virtual void traverse_string (member_info& mi) { - // @@ Why not use std::size_t instead of unsigned long? - // - os << image_type << " " << mi.var << "value;" - << "unsigned long " << mi.var << "size;" + << "std::size_t " << mi.var << "size;" << "bool " << mi.var << "null;" << endl; } @@ -111,16 +99,10 @@ namespace relational virtual void traverse_bit (member_info& mi) { - // @@ Range is unlimited. Problematic for stack allocated - // array? - // - // Why not use std::size_t instead of unsigned long? - // - unsigned int n (mi.st->range / 8 + (mi.st->range % 8 ? 1 : 0)); os << "unsigned char " << mi.var << "value[" << n << "];" - << "unsigned long " << mi.var << "size;" + << "std::size_t " << mi.var << "size;" << "bool " << mi.var << "null;" << endl; } @@ -128,11 +110,8 @@ namespace relational virtual void traverse_varbit (member_info& mi) { - // @@ Why not use std::size_t instead of unsigned long? - // - os << image_type << " " << mi.var << "value;" - << "unsigned long " << mi.var << "size;" + << "std::size_t " << mi.var << "size;" << "bool " << mi.var << "null;" << endl; } |