summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/internal/util/mmap_unix.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2025-02-13 08:53:40 +0000
committerLibravatar GitHub <noreply@github.com>2025-02-13 09:53:40 +0100
commit24f6760c0e355903458f71e539201c8bf37cfac6 (patch)
treec5f43e72ba452fddceb3c2531a64d4b835246927 /vendor/github.com/ncruces/go-sqlite3/internal/util/mmap_unix.go
parent[feature] Implement backfilling statuses thru scheduled_at (#3685) (diff)
downloadgotosocial-24f6760c0e355903458f71e539201c8bf37cfac6.tar.xz
[chore] bump ncruces go-sqlite3 => v0.23.0 (#3785)
* bump ncruces go-sqlite3 => v0.23.0 * whoops, add missing vendor changes...
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/internal/util/mmap_unix.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/internal/util/mmap_unix.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/internal/util/mmap_unix.go b/vendor/github.com/ncruces/go-sqlite3/internal/util/mmap_unix.go
index 4ff056666..42a247529 100644
--- a/vendor/github.com/ncruces/go-sqlite3/internal/util/mmap_unix.go
+++ b/vendor/github.com/ncruces/go-sqlite3/internal/util/mmap_unix.go
@@ -25,9 +25,9 @@ func (s *mmapState) new(ctx context.Context, mod api.Module, size int32) *Mapped
// Allocate page aligned memmory.
alloc := mod.ExportedFunction("aligned_alloc")
- stack := [...]uint64{
- uint64(unix.Getpagesize()),
- uint64(size),
+ stack := [...]Stk_t{
+ Stk_t(unix.Getpagesize()),
+ Stk_t(size),
}
if err := alloc.CallWithStack(ctx, stack[:]); err != nil {
panic(err)
@@ -37,20 +37,20 @@ func (s *mmapState) new(ctx context.Context, mod api.Module, size int32) *Mapped
}
// Save the newly allocated region.
- ptr := uint32(stack[0])
- buf := View(mod, ptr, uint64(size))
- res := &MappedRegion{
+ ptr := Ptr_t(stack[0])
+ buf := View(mod, ptr, int64(size))
+ ret := &MappedRegion{
Ptr: ptr,
size: size,
addr: unsafe.Pointer(&buf[0]),
}
- s.regions = append(s.regions, res)
- return res
+ s.regions = append(s.regions, ret)
+ return ret
}
type MappedRegion struct {
addr unsafe.Pointer
- Ptr uint32
+ Ptr Ptr_t
size int32
used bool
}