Skip to content
This repository was archived by the owner on Jul 25, 2020. It is now read-only.

Fix various mutability problems. #104

Merged
merged 1 commit into from
Jul 30, 2014

Conversation

lifthrasiir
Copy link
Collaborator

The fix was planned after #94 but I was a bit late in the party. So, this commit fixes the following:

  • Fixed a mistake that Database was accidentally Sendable.
  • Made Cursor::{reset, clear_bindings, step, step_row, get_blob, get_int, get_i64, get_f64, get_text, bind_param, bind_params} receive &mut self.
  • Made Database::set_busy_timeout receive &mut self. Database::{prepare, exec} has been left as is, since it is perfectly safe to have multiple cursors (see prepared_stmt_bind_static_text_interleaved test for an example). The associated thread safety issue is handled by making Database non-Sendable.

Closes #98, #99, #100, #101 and #103.

- fixed a mistake that `Database` was accidentally `Send`able.
- made `Cursor::{reset, clear_bindings, step, step_row,
  get_blob, get_int, get_i64, get_f64, get_text, bind_param,
  bind_params}` receive `&mut self`.
- made `Database::set_busy_timeout` receive `&mut self`.
  `Database::{prepare, exec}` has been left as is, since it is
  perfectly safe to have multiple cursors. the associated
  thread safety issue is separately handled.

closes linuxfood#98, linuxfood#99, linuxfood#100, linuxfood#101 and linuxfood#103.
kud1ing pushed a commit that referenced this pull request Jul 30, 2014
Fix various mutability problems.
@kud1ing kud1ing merged commit c99b7ee into linuxfood:master Jul 30, 2014
@kud1ing
Copy link
Contributor

kud1ing commented Jul 30, 2014

Cool, thanks.

@lifthrasiir
Copy link
Collaborator Author

@kud1ing Can you close other relevant issues? GitHub's commit message parser is too naive to close other issues. :)

@kud1ing
Copy link
Contributor

kud1ing commented Aug 6, 2014

@lifthrasiir: I wonder whether development should move to a more open fork.
I'm only a "guest admin" myself, and i think it would make sense for you to have more control of this project, which i can not give you.

@linuxfood
Copy link
Owner

@kud1ing are you unable to grant people collaborator status? If so, we should remedy that.

As for @lifthrasiir, I'll make you a collaborator as well.

@kud1ing
Copy link
Contributor

kud1ing commented Aug 9, 2014

@linuxfood: I don't think i can. I would expect a settings menu, but i don't see that.
Thanks for making @lifthrasiir a collaborator.

@kud1ing
Copy link
Contributor

kud1ing commented Aug 13, 2014

@linuxfood Can you remove me? I'd like to retire. I had only time to merge the work of others anyway (mostly by @lifthrasiir).

@linuxfood
Copy link
Owner

@kud1ing done, you are retired.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cursor::step() is not safe
3 participants