Skip to content

Windows build fails: C.ulong vs size_t type mismatch in table.go #17

@nvandessel

Description

@nvandessel

Bug

pkg/internal/table.go:187 uses C.ulong(len(ipcBytes)) but the C header declares the parameter as size_t:

// include/lancedb.h
struct SimpleResult *simple_lancedb_table_add_ipc(void *table_handle,
                                                  const uint8_t *ipc_data,
                                                  size_t ipc_len,  // <--
                                                  int64_t *added_count);

On Windows (LLP64), unsigned long is 32-bit but size_t is 64-bit, so the types don't match.

Fix

-		C.ulong(len(ipcBytes)),
+		C.size_t(len(ipcBytes)),

C.size_t is already used correctly in table.go:92 and connection.go:193.

Environment

  • Go 1.25, Windows, MinGW (GitHub Actions windows-latest)
  • lancedb-go v0.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions