mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix all Foo{!}
This commit is contained in:
parent
e32cbfcca7
commit
40df0644ca
@ -70,7 +70,7 @@ pub mut:
|
||||
|
||||
// fn new_context(width, height int, use_ortho bool, font_size int) *GG {
|
||||
pub fn new_context(cfg Cfg) &GG {
|
||||
mut window := &glfw.Window{!}
|
||||
mut window := &glfw.Window(0)
|
||||
if cfg.create_window {
|
||||
if cfg.resizable {
|
||||
glfw.window_hint(C.GLFW_RESIZABLE, 1)
|
||||
|
@ -73,7 +73,7 @@ fn (req &Request) ssl_do(port int, method, host_name, path string) ?Response {
|
||||
res = C.BIO_set_conn_hostname(web, addr.str)
|
||||
if res != 1 {
|
||||
}
|
||||
ssl := &C.SSL{!}
|
||||
ssl := &C.SSL(0)
|
||||
C.BIO_get_ssl(web, &ssl)
|
||||
if isnil(ssl) {
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ pub fn (s Socket) connect(address string, port int) ?int {
|
||||
hints.ai_next = C.NULL
|
||||
|
||||
|
||||
info := &C.addrinfo{!}
|
||||
info := &C.addrinfo(0)
|
||||
sport := '$port'
|
||||
info_res := C.getaddrinfo(address.str, sport.str, &hints, &info)
|
||||
if info_res != 0 {
|
||||
|
@ -19,13 +19,13 @@ pub mut:
|
||||
}
|
||||
|
||||
pub fn connect(path string) DB {
|
||||
db := &C.sqlite3{!}
|
||||
db := &C.sqlite3(0)
|
||||
C.sqlite3_open(path.str, &db)
|
||||
return DB {conn: db}
|
||||
}
|
||||
|
||||
pub fn (db DB) q_int(query string) int {
|
||||
stmt := &C.sqlite3_stmt{!}
|
||||
stmt := &C.sqlite3_stmt(0)
|
||||
C.sqlite3_prepare_v2(db.conn, query.str, - 1, &stmt, 0)
|
||||
C.sqlite3_step(stmt)
|
||||
res := C.sqlite3_column_int(stmt, 0)
|
||||
@ -41,7 +41,7 @@ fn C.sqlite3_prepare_v2()
|
||||
fn C.sqlite3_finalize()
|
||||
|
||||
pub fn (db DB) q_string(query string) string {
|
||||
stmt := &C.sqlite3_stmt{!}
|
||||
stmt := &C.sqlite3_stmt(0)
|
||||
C.sqlite3_prepare_v2(db.conn, query.str, - 1, &stmt, 0)
|
||||
C.sqlite3_step(stmt)
|
||||
f := C.sqlite3_column_text(stmt, 0)
|
||||
@ -53,7 +53,7 @@ pub fn (db DB) q_string(query string) string {
|
||||
fn C.sqlite3_column_count(voidptr) int
|
||||
|
||||
pub fn (db DB) exec(query string) []Row {
|
||||
stmt := &C.sqlite3_stmt{!}
|
||||
stmt := &C.sqlite3_stmt(0)
|
||||
C.sqlite3_prepare_v2(db.conn, query.str, - 1, &stmt, 0)
|
||||
nr_cols := C.sqlite3_column_count(stmt)
|
||||
//println('nr cols $nr_cols')
|
||||
|
Loading…
Reference in New Issue
Block a user