Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Windows support #55

Merged
merged 1 commit into from
Jul 31, 2023
Merged

feat: Windows support #55

merged 1 commit into from
Jul 31, 2023

Conversation

michalc
Copy link
Owner

@michalc michalc commented Jul 30, 2023

It looks like for Windows in the production code:

  • sqlite3_initialize must be called explicitly to avoid access violation writing 0x0000000000000000

  • using SQLITE_TRANSIENT as -1 causes access violation writing 0x00000000FFFFFFFF. This is probably since Python casts -1 to c_int, when it should be a pointer, and so c_void_p. Maybe in a later change could change it to SQLITE_STATIC, but not doing that now to keep this change small.

And in tests:

  • to allow the test SQLite database to be deleted, the cursor and connection objects have to be removed from scope. Otherwise Windows thinks the file object is still open, and refuses to allow the deletion of the database at the end of the test

Closes: #46

@michalc michalc force-pushed the ci/test-windows branch 30 times, most recently from 4932fe9 to 4a34efe Compare July 30, 2023 12:37
@michalc michalc force-pushed the ci/test-windows branch 26 times, most recently from 2f5d890 to 6eb8934 Compare July 31, 2023 19:40
It looks like for Windows in the production code:

- sqlite3_initialize must be called explicitly to avoid access violation
  writing 0x0000000000000000

- using SQLITE_TRANSIENT as -1 causes access violation writing
  0x00000000FFFFFFFF. This is probably since Python cases -1 to c_int, when it
  should be a pointer, and so c_void_p. Maybe in a later change could change it
  to SQLITE_STATIC, but not doing that now to keep this change small.

And in tests:

- to allow the test SQLite database to be deleted, the cursor and connection
  objects have to be removed from scope. Otherwise Windows thinks the file
  object is still open, and refuses to allow the deletion of the database at the
  end of the test

Closes: #46
@michalc michalc merged commit 4ddec61 into main Jul 31, 2023
@michalc michalc deleted the ci/test-windows branch July 31, 2023 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OSError: exception: access violation writing 0x0000000000000000
1 participant