Skip to content

Commit

Permalink
- fix for latest rocksdb
Browse files Browse the repository at this point in the history
  • Loading branch information
ssardana08 committed Jan 25, 2022
1 parent f0fad39 commit 9721107
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ func (db *DB) GetApproximateSizes(ranges []Range) []uint64 {
cLimits := make([]*C.char, len(ranges))
cStartLens := make([]C.size_t, len(ranges))
cLimitLens := make([]C.size_t, len(ranges))
cErrors := make([]*C.char, len(ranges))
for i, r := range ranges {
cStarts[i] = (*C.char)(C.CBytes(r.Start))
cStartLens[i] = C.size_t(len(r.Start))
Expand All @@ -613,7 +614,8 @@ func (db *DB) GetApproximateSizes(ranges []Range) []uint64 {
&cStartLens[0],
&cLimits[0],
&cLimitLens[0],
(*C.uint64_t)(&sizes[0]))
(*C.uint64_t)(&sizes[0]),
&cErrors[0])

return sizes
}
Expand All @@ -633,6 +635,7 @@ func (db *DB) GetApproximateSizesCF(cf *ColumnFamilyHandle, ranges []Range) []ui
cLimits := make([]*C.char, len(ranges))
cStartLens := make([]C.size_t, len(ranges))
cLimitLens := make([]C.size_t, len(ranges))
cErrors := make([]*C.char, len(ranges))
for i, r := range ranges {
cStarts[i] = (*C.char)(C.CBytes(r.Start))
cStartLens[i] = C.size_t(len(r.Start))
Expand All @@ -655,7 +658,8 @@ func (db *DB) GetApproximateSizesCF(cf *ColumnFamilyHandle, ranges []Range) []ui
&cStartLens[0],
&cLimits[0],
&cLimitLens[0],
(*C.uint64_t)(&sizes[0]))
(*C.uint64_t)(&sizes[0]),
&cErrors[0])

return sizes
}
Expand Down

0 comments on commit 9721107

Please sign in to comment.