Skip to content

Commit

Permalink
Fix CreateColumnFamilyTTL signature
Browse files Browse the repository at this point in the history
  • Loading branch information
linxGnu committed Sep 13, 2021
1 parent 5baba6b commit 01b66fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -901,13 +901,13 @@ func (db *DB) CreateColumnFamily(opts *Options, name string) (handle *ColumnFami
//
// CONSTRAINTS:
// Not specifying/passing or non-positive TTL behaves like TTL = infinity
func (db *DB) CreateColumnFamilyWithTTL(opts *Options, name string, ttl C.int) (handle *ColumnFamilyHandle, err error) {
func (db *DB) CreateColumnFamilyWithTTL(opts *Options, name string, ttl int) (handle *ColumnFamilyHandle, err error) {
var (
cErr *C.char
cName = C.CString(name)
)

cHandle := C.rocksdb_create_column_family_with_ttl(db.c, opts.c, cName, ttl, &cErr)
cHandle := C.rocksdb_create_column_family_with_ttl(db.c, opts.c, cName, C.int(ttl), &cErr)
if err = fromCError(cErr); err == nil {
handle = NewNativeColumnFamilyHandle(cHandle)
}
Expand Down

0 comments on commit 01b66fd

Please sign in to comment.