@ebowwa/bun-native-page 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.ts +4 -4
  2. package/package.json +2 -2
package/dist/index.ts CHANGED
@@ -8,7 +8,7 @@ export * from './errors.js';
8
8
  export * from './oom.js';
9
9
  export * from './allocator.js';
10
10
 
11
- import { ffi, ptr, toArrayBuffer } from './ffi.js';
11
+ import { ffi, toArrayBuffer } from './ffi.js';
12
12
  import { PageSizeError, MapError, ProtectionError, LockError } from './errors.js';
13
13
  import { handleOOM, type OOMOptions } from './oom.js';
14
14
 
@@ -192,9 +192,9 @@ export function isPageAligned(ptr: bigint | number): boolean {
192
192
  // ============================================================================
193
193
 
194
194
  function toRawPtr(p: unknown): number {
195
- // Bun FFI Pointer is an opaque number-like type
196
- // Use ptr() to convert, then extract the raw value
197
- return ptr(p as number) as unknown as number;
195
+ // Bun FFI pointer return type is already a number (raw address)
196
+ // Cast directly - ptr() is for buffers, not FFI pointer returns
197
+ return p as unknown as number;
198
198
  }
199
199
 
200
200
  // ============================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebowwa/bun-native-page",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Cross-platform page-size aware memory operations for Bun - BufferPool, PageArena, mmap/munmap, mlock, mprotect, Windows file mapping",
5
5
  "main": "dist/index.ts",
6
6
  "exports": {
@@ -67,6 +67,6 @@
67
67
  "bun-types": "^1.3.10"
68
68
  },
69
69
  "dependencies": {
70
- "@ebowwa/bun-native-page": "0.2.3"
70
+ "@ebowwa/bun-native-page": "0.2.4"
71
71
  }
72
72
  }