Changeset

11578:dfc5d8f6788e

teal: Add type spec for util.ringbuffer
author Kim Alvefur <zash@zash.se>
date Thu, 20 May 2021 23:16:01 +0200
parents 11577:60bee6822d79
children 11579:ec4f0ec3c0d5
files teal-src/util/ringbuffer.d.tl
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/teal-src/util/ringbuffer.d.tl	Thu May 20 23:16:01 2021 +0200
@@ -0,0 +1,20 @@
+local record lib
+	record ringbuffer
+		find : function (ringbuffer, string) : integer
+		discard : function (ringbuffer, integer) : boolean
+		read : function (ringbuffer, integer, boolean) : string
+		readuntil : function (ringbuffer, string) : string
+		write : function (ringbuffer, string) : integer
+		size : function (ringbuffer) : integer
+		length : function (ringbuffer) : integer
+		sub : function (ringbuffer, integer, integer) : string
+		byte : function (ringbuffer, integer, integer) : integer...
+		free : function (ringbuffer) : integer
+	end
+
+	new : function (integer) : ringbuffer
+end
+
+return lib
+
+