Skip to content

Commit

Permalink
Windows: fix incompatible type (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
linxGnu authored Oct 13, 2022
1 parent 54000e1 commit ebc8c83
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ on:

jobs:
build:
name: Build
runs-on: ubuntu-latest
name: CI

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x]

steps:
- name: Set up Go 1.x
uses: actions/setup-go@v3
Expand Down
2 changes: 1 addition & 1 deletion cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (l *LRUCacheOptions) Destroy() {

// SetCapacity sets capacity for this lru cache.
func (l *LRUCacheOptions) SetCapacity(s uint) {
C.rocksdb_lru_cache_options_set_capacity(l.c, C.ulong(s))
C.rocksdb_lru_cache_options_set_capacity(l.c, C.size_t(s))
}

// SetCapacity sets number of shards used for this lru cache.
Expand Down
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ func (opts *Options) SetRowCache(cache *Cache) {
// entries in any "N" consecutive entries or the ratio of tombstone
// entries in the whole file >= the specified deletion ratio.
func (opts *Options) AddCompactOnDeletionCollectorFactory(windowSize, numDelsTrigger uint) {
C.rocksdb_options_add_compact_on_deletion_collector_factory(opts.c, C.ulong(windowSize), C.ulong(numDelsTrigger))
C.rocksdb_options_add_compact_on_deletion_collector_factory(opts.c, C.size_t(windowSize), C.size_t(numDelsTrigger))
}

// SetManualWALFlush if true WAL is not flushed automatically after each write. Instead it
Expand Down

0 comments on commit ebc8c83

Please sign in to comment.