Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Deprecated cast syntax in cbind example


The cbind example at http://git.eigenstate.org/ori/cbind-example.git was using
the old-style cast and wouldn't compile. I've attached a patch fixing it.

-Ryan
diff --git a/main.myr b/main.myr
index f44333e..71923a9 100644
--- a/main.myr
+++ b/main.myr
@@ -11,6 +11,6 @@ const main = {
 	h = "hello world from C\n\0"
 
 	/* we need some casting to get pointers from slices. */
-	libc.write(1, h[:h.len-2] castto(byte#), h.len)
-	libc.puts(h castto(byte#))
+	libc.write(1, (h[:h.len-2] : byte#), h.len)
+	libc.puts((h : byte#))
 }

Follow-Ups:
Re: Deprecated cast syntax in cbind exampleOri Bernstein <ori@xxxxxxxxxxxxxx>