mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
removed require to define available, tell, seek in ioLib
This commit is contained in:
parent
21019e6737
commit
82da7e907d
5 changed files with 20 additions and 45 deletions
|
|
@ -98,10 +98,6 @@ function lib.tell(descriptor)
|
|||
return positions[descriptor]
|
||||
end
|
||||
|
||||
function lib.flush(descriptor)
|
||||
requireDescriptor(descriptor)
|
||||
end
|
||||
|
||||
function lib.available(descriptor)
|
||||
requireDescriptor(descriptor)
|
||||
|
||||
|
|
|
|||
|
|
@ -60,18 +60,6 @@ function lib.write(fd, bytearray)
|
|||
end
|
||||
end
|
||||
|
||||
function lib.seek(fd, mode, offset)
|
||||
error("cannot seek the named pipe")
|
||||
end
|
||||
|
||||
function lib.tell(fd)
|
||||
error("cannot tell the named pipe")
|
||||
end
|
||||
|
||||
function lib.flush(fd)
|
||||
-- no flush on unix
|
||||
end
|
||||
|
||||
function lib.available(fd)
|
||||
if fd == nil or fd < 0 then return 0 end
|
||||
|
||||
|
|
|
|||
|
|
@ -97,14 +97,6 @@ function lib.write(handle, bytearray)
|
|||
end
|
||||
end
|
||||
|
||||
function lib.seek(handle, mode, offset)
|
||||
error("cannot seek the named pipe")
|
||||
end
|
||||
|
||||
function lib.tell(handle)
|
||||
error("cannot tell the named pipe")
|
||||
end
|
||||
|
||||
function lib.flush(handle)
|
||||
C.FlushFileBuffers(handle)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -32,18 +32,6 @@ function lib.write(descriptor, data)
|
|||
sockets[descriptor]:send(data)
|
||||
end
|
||||
|
||||
function lib.seek(descriptor, mode, offset)
|
||||
error("cannot seek socket")
|
||||
end
|
||||
|
||||
function lib.tell(descriptor)
|
||||
error("cannot tell socket")
|
||||
end
|
||||
|
||||
function lib.flush(descriptor)
|
||||
requireDescriptor(descriptor)
|
||||
end
|
||||
|
||||
function lib.available(descriptor)
|
||||
requireDescriptor(descriptor)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue