Improved type system

This commit is contained in:
Eduard Urbach 2025-02-17 14:31:47 +01:00
parent 78f2670553
commit 6eab48c586
Signed by: eduard
GPG key ID: 49226B848C78F6C8
62 changed files with 189 additions and 172 deletions

View file

@ -1,3 +1,3 @@
htons(num Int) -> Int {
htons(num int) -> int {
return ((num & 0xFF) << 8) | (num >> 8)
}

View file

@ -1,6 +1,6 @@
import sys
bind(socket Int, port Int) -> Int {
bind(socket int, port int) -> int {
addr := new(sys.sockaddr_in)
addr.sin_family = 2
addr.sin_port = htons(port)

View file

@ -1,6 +1,6 @@
import sys
bind(socket Int, port Int) -> Int {
bind(socket int, port int) -> int {
addr := new(sys.sockaddr_in_bsd)
addr.sin_family = 2
addr.sin_port = htons(port)