schema: Enable shared_from_this()

This commit is contained in:
Tomasz Grabiec
2015-11-29 12:45:08 +01:00
parent 8a05b61d68
commit 533aec84b3
2 changed files with 2 additions and 2 deletions

View File

@@ -322,7 +322,7 @@ extern template class serializer<column_mapping>;
* Effectively immutable.
* Not safe to access across cores because of shared_ptr's.
*/
class schema final {
class schema final : public enable_lw_shared_from_this<schema> {
private:
// More complex fields are derived from these inside rebuild().
// Contains only fields which can be safely default-copied.

View File

@@ -93,7 +93,7 @@ class scylla_column_families(gdb.Command):
cfs = db['_column_families']
for (key, value) in list_unordered_map(cfs):
value = value['_p']['_value'] # it's a lw_shared_ptr
schema = value['_schema']['_p']['_value']
schema = value['_schema']['_p'].reinterpret_cast(gdb.lookup_type('schema').pointer())
name = str(schema['_raw']['_ks_name']) + '/' + str(schema['_raw']['_cf_name'])
schema_version = str(schema['_raw']['_version'])
gdb.write('{:5} {} v={} {:45} (column_family*){}\n'.format(shard, key, schema_version, name, value.address))