http_win: fix BUF_MAX

pull/1181/head
Alexander Medvednikov 2019-07-16 15:29:27 +02:00
parent 54b069f9ad
commit 8aa7da1be1
3 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,10 @@
## V 0.1.16
*17 Jul 2019*
- High order functions
## V 0.1.15
*15 Jul 2019*
- FreeBSD, OpenBSD, NetBSD, DragonFly support.

View File

@ -1489,7 +1489,7 @@ fn (p mut Parser) name_expr() string {
fn (p mut Parser) var_expr(v Var) string {
p.log('\nvar_expr() v.name="$v.name" v.typ="$v.typ"')
// 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()
p.expr_var = v
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
// Function pointer?
if typ.starts_with('fn ') {
println('CALLING FN PTR')
p.print_tok()
//println('CALLING FN PTR')
//p.print_tok()
T := p.table.find_type(typ)
p.gen('(')
p.fn_call_args(T.func)

View File

@ -20,6 +20,10 @@ import const (
INTERNET_SERVICE_HTTP
)
const (
BUF_MAX = 1024
)
pub fn (req &Request) do() Response {
emptyresp := Response{}
mut url := req.url
@ -121,7 +125,6 @@ pub fn (req &Request) do() Response {
// # TCHAR buf[BUF_MAX + 1];
mut buf := [1025]byte
mut nr_read := 0
BUF_MAX := 1024
// ok := C.InternetReadFile(request, buf, BUF_MAX, &nr_read)
// # DWORD dwRead = 0;
// /println('calling InternetReadFile()')