Skip to content

Commit

Permalink
Merge pull request #556 from jhawthorn/fix_write_barrier
Browse files Browse the repository at this point in the history
Use write barrier when setting busy_handler
  • Loading branch information
flavorjones authored Sep 12, 2024
2 parents 164485a + f759e82 commit 480f3e7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion ext/sqlite3/database.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ busy_handler(int argc, VALUE *argv, VALUE self)
rb_scan_args(argc, argv, "01", &block);

if (NIL_P(block) && rb_block_given_p()) { block = rb_block_proc(); }
ctx->busy_handler = block;
RB_OBJ_WRITE(self, &ctx->busy_handler, block);

status = sqlite3_busy_handler(
ctx->db,
Expand Down
1 change: 0 additions & 1 deletion lib/sqlite3/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def initialize file, options = {}, zvfs = nil

@tracefunc = nil
@authorizer = nil
@busy_handler = nil
@progress_handler = nil
@collations = {}
@functions = {}
Expand Down

0 comments on commit 480f3e7

Please sign in to comment.