mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker/parser: allow for fixed array with sizes defined with a const
This commit is contained in:
@@ -302,7 +302,6 @@ pub fn (s Socket) close() ?int {
|
||||
pub const (
|
||||
CRLF = '\r\n'
|
||||
MAX_READ = 400
|
||||
xxx = 400
|
||||
MSG_PEEK = 0x02
|
||||
)
|
||||
// write - write a string with CRLF after it over the socket s
|
||||
@@ -317,7 +316,6 @@ pub fn (s Socket) write(str string) ?int {
|
||||
|
||||
// read_line - retrieves a line from the socket s (i.e. a string ended with \n)
|
||||
pub fn (s Socket) read_line() string {
|
||||
//mut buf2 := [xxx]byte // where C.recv will store the network data
|
||||
mut buf := [MAX_READ]byte // where C.recv will store the network data
|
||||
mut res := '' // The final result, including the ending \n.
|
||||
for {
|
||||
@@ -385,4 +383,3 @@ pub fn (s Socket) get_port() int {
|
||||
C.getsockname(s.sockfd, &addr, &size)
|
||||
return C.ntohs(addr.sin_port)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user