mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: remove special case for http__init_module call
tmp fix until `fn init()` is supported
This commit is contained in:

committed by
Alexander Medvednikov

parent
4c898ab6b3
commit
ab291902d8
@@ -27,7 +27,7 @@ struct C.SSL {
|
||||
|
||||
}
|
||||
|
||||
fn init_module() {
|
||||
fn init() int {
|
||||
$if mac {
|
||||
C.SSL_library_init()
|
||||
}
|
||||
@@ -36,6 +36,7 @@ fn init_module() {
|
||||
}
|
||||
//C.SSL_load_error_strings()
|
||||
//C.OPENSSL_config(0)
|
||||
return 1
|
||||
}
|
||||
|
||||
fn (req &Request) ssl_do(port int, method, host_name, path string) Response {
|
||||
|
@@ -13,7 +13,7 @@ module http
|
||||
|
||||
fn C.new_tls_context() C.TlsContext
|
||||
|
||||
fn init_module() {}
|
||||
fn init() int { return 1 }
|
||||
|
||||
fn (req &Request) ssl_do(port int, method, host_name, path string) Response {
|
||||
mut ctx := C.new_tls_context()
|
||||
|
@@ -9,6 +9,7 @@ import http.chunked
|
||||
|
||||
const (
|
||||
max_redirects = 4
|
||||
started = http.init()
|
||||
)
|
||||
|
||||
struct Request {
|
||||
|
Reference in New Issue
Block a user