Skip to content

Commit 0345753

Browse files
committed
style: formatting and fix a typo
1 parent 7d2cec6 commit 0345753

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

ext/sqlite3/database.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ busy_handler(int argc, VALUE *argv, VALUE self)
249249
ctx->busy_handler = block;
250250

251251
status = sqlite3_busy_handler(
252-
ctx->db,
253-
NIL_P(block) ? NULL : rb_sqlite3_busy_handler,
254-
(void *)ctx
255-
);
252+
ctx->db,
253+
NIL_P(block) ? NULL : rb_sqlite3_busy_handler,
254+
(void *)ctx
255+
);
256256

257257
CHECK(ctx->db, status);
258258

ext/sqlite3/sqlite3.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ init_sqlite3_constants(void)
111111
rb_define_const(mSqlite3Open, "MAIN_JOURNAL", INT2FIX(SQLITE_OPEN_MAIN_JOURNAL));
112112
rb_define_const(mSqlite3Open, "TEMP_JOURNAL", INT2FIX(SQLITE_OPEN_TEMP_JOURNAL));
113113
rb_define_const(mSqlite3Open, "SUBJOURNAL", INT2FIX(SQLITE_OPEN_SUBJOURNAL));
114-
rb_define_const(mSqlite3Open, "MASTER_JOURNAL", INT2FIX(SQLITE_OPEN_MASTER_JOURNAL)); /* pre-3.33.0 */
114+
rb_define_const(mSqlite3Open, "MASTER_JOURNAL",
115+
INT2FIX(SQLITE_OPEN_MASTER_JOURNAL)); /* pre-3.33.0 */
115116
rb_define_const(mSqlite3Open, "SUPER_JOURNAL", INT2FIX(SQLITE_OPEN_MASTER_JOURNAL));
116117
rb_define_const(mSqlite3Open, "NOMUTEX", INT2FIX(SQLITE_OPEN_NOMUTEX));
117118
rb_define_const(mSqlite3Open, "FULLMUTEX", INT2FIX(SQLITE_OPEN_FULLMUTEX));

ext/sqlite3/statement.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,19 @@ step(VALUE self)
156156
break;
157157
case SQLITE_TEXT: {
158158
val = rb_utf8_str_new(
159-
(const char *)sqlite3_column_text(stmt, i),
160-
(long)sqlite3_column_bytes(stmt, i)
161-
);
159+
(const char *)sqlite3_column_text(stmt, i),
160+
(long)sqlite3_column_bytes(stmt, i)
161+
);
162162
if (internal_encoding) {
163163
val = rb_str_export_to_enc(val, internal_encoding);
164164
}
165165
}
166166
break;
167167
case SQLITE_BLOB: {
168168
val = rb_str_new(
169-
(const char *)sqlite3_column_blob(stmt, i),
170-
(long)sqlite3_column_bytes(stmt, i)
171-
);
169+
(const char *)sqlite3_column_blob(stmt, i),
170+
(long)sqlite3_column_bytes(stmt, i)
171+
);
172172
}
173173
break;
174174
case SQLITE_NULL:

lib/sqlite3/statement.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Statement
2626
# statement (i.e., separated by semicolons), then the #remainder property
2727
# will be set to the trailing text.
2828
def initialize(db, sql)
29-
raise ArgumentError, "pepare called on a closed database" if db.closed?
29+
raise ArgumentError, "prepare called on a closed database" if db.closed?
3030

3131
sql = sql.encode(Encoding::UTF_8) if sql && sql.encoding != Encoding::UTF_8
3232

0 commit comments

Comments
 (0)