http_win: fix BUF_MAX
parent
54b069f9ad
commit
8aa7da1be1
|
@ -1,3 +1,10 @@
|
||||||
|
## V 0.1.16
|
||||||
|
*17 Jul 2019*
|
||||||
|
- High order functions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## V 0.1.15
|
## V 0.1.15
|
||||||
*15 Jul 2019*
|
*15 Jul 2019*
|
||||||
- FreeBSD, OpenBSD, NetBSD, DragonFly support.
|
- FreeBSD, OpenBSD, NetBSD, DragonFly support.
|
||||||
|
|
|
@ -1489,7 +1489,7 @@ fn (p mut Parser) name_expr() string {
|
||||||
fn (p mut Parser) var_expr(v Var) string {
|
fn (p mut Parser) var_expr(v Var) string {
|
||||||
p.log('\nvar_expr() v.name="$v.name" v.typ="$v.typ"')
|
p.log('\nvar_expr() v.name="$v.name" v.typ="$v.typ"')
|
||||||
// println('var expr is_tmp=$p.cgen.is_tmp\n')
|
// println('var expr is_tmp=$p.cgen.is_tmp\n')
|
||||||
p.cur_fn.mark_var_used(v)
|
p.cur_fn.mark_var_used(v)
|
||||||
fn_ph := p.cgen.add_placeholder()
|
fn_ph := p.cgen.add_placeholder()
|
||||||
p.expr_var = v
|
p.expr_var = v
|
||||||
p.gen(p.table.var_cgen_name(v.name))
|
p.gen(p.table.var_cgen_name(v.name))
|
||||||
|
@ -1497,8 +1497,8 @@ fn (p mut Parser) var_expr(v Var) string {
|
||||||
mut typ := v.typ
|
mut typ := v.typ
|
||||||
// Function pointer?
|
// Function pointer?
|
||||||
if typ.starts_with('fn ') {
|
if typ.starts_with('fn ') {
|
||||||
println('CALLING FN PTR')
|
//println('CALLING FN PTR')
|
||||||
p.print_tok()
|
//p.print_tok()
|
||||||
T := p.table.find_type(typ)
|
T := p.table.find_type(typ)
|
||||||
p.gen('(')
|
p.gen('(')
|
||||||
p.fn_call_args(T.func)
|
p.fn_call_args(T.func)
|
||||||
|
|
|
@ -20,6 +20,10 @@ import const (
|
||||||
INTERNET_SERVICE_HTTP
|
INTERNET_SERVICE_HTTP
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
BUF_MAX = 1024
|
||||||
|
)
|
||||||
|
|
||||||
pub fn (req &Request) do() Response {
|
pub fn (req &Request) do() Response {
|
||||||
emptyresp := Response{}
|
emptyresp := Response{}
|
||||||
mut url := req.url
|
mut url := req.url
|
||||||
|
@ -121,7 +125,6 @@ pub fn (req &Request) do() Response {
|
||||||
// # TCHAR buf[BUF_MAX + 1];
|
// # TCHAR buf[BUF_MAX + 1];
|
||||||
mut buf := [1025]byte
|
mut buf := [1025]byte
|
||||||
mut nr_read := 0
|
mut nr_read := 0
|
||||||
BUF_MAX := 1024
|
|
||||||
// ok := C.InternetReadFile(request, buf, BUF_MAX, &nr_read)
|
// ok := C.InternetReadFile(request, buf, BUF_MAX, &nr_read)
|
||||||
// # DWORD dwRead = 0;
|
// # DWORD dwRead = 0;
|
||||||
// /println('calling InternetReadFile()')
|
// /println('calling InternetReadFile()')
|
||||||
|
|
Loading…
Reference in New Issue