]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Add return codes to FileStream.putc/puts(), like posix
authorReuben Thomas <rrt@sc3d.org>
Wed, 21 Oct 2020 19:59:41 +0000 (21:59 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 3 Jan 2021 11:50:33 +0000 (12:50 +0100)
The corresponding C functions return a status code; make the GLib types
the same as the Posix types.

This gives these functions the correct type signature for use where a
putc-like function is required.

vapi/glib-2.0.vapi

index ce2df7039c3f44c152ac999b20384eac5194f5ec..221e48f5b3081f502f45381d2ef502522bc98e25 100644 (file)
@@ -3648,9 +3648,9 @@ namespace GLib {
                [CCode (cname = "vfprintf")]
                public void vprintf (string format, va_list args);
                [CCode (cname = "fputc", instance_pos = -1)]
-               public void putc (char c);
+               public int putc (char c);
                [CCode (cname = "fputs", instance_pos = -1)]
-               public void puts (string s);
+               public int puts (string s);
                [CCode (cname = "fgetc")]
                public int getc ();
                [CCode (cname = "ungetc", instance_pos = -1)]