Commit ad7b17bb authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

fix Soup.HttpVersion enum

2007-08-07  Juerg Billeter  <j@bitron.ch>

	* vapi/libsoup-2.2.vala, vapigen/valagidlparser.vala: fix
	  Soup.HttpVersion enum

svn path=/trunk/; revision=429
parent e17a0347
2007-08-07 Jürg Billeter <j@bitron.ch>
* vapi/libsoup-2.2.vala, vapigen/valagidlparser.vala: fix
Soup.HttpVersion enum
2007-08-07 Jürg Billeter <j@bitron.ch>
* vapi/Makefile.am: add libsoup-2.2.vala
......
......@@ -22,10 +22,10 @@ namespace Soup {
BODY_CHUNK,
POST_BODY,
}
[CCode (cprefix = "SOUP_HTTP_1_", cheader_filename = "libsoup/soup.h")]
[CCode (cprefix = "SOUP_HTTP_", cheader_filename = "libsoup/soup.h")]
public enum HttpVersion {
0,
1,
1_0,
1_1,
}
[CCode (cprefix = "SOUP_STATUS_", cheader_filename = "libsoup/soup.h")]
public enum KnownStatusCode {
......
......@@ -376,6 +376,11 @@ public class Vala.GIdlParser : CodeVisitor {
common_prefix = common_prefix.ndup (common_prefix.size () - 1);
}
}
while (common_prefix.len () > 0 && (!common_prefix.has_suffix ("_") ||
(value.name.offset (common_prefix.size ()).get_char ().isdigit ()) && (value.name.len () - common_prefix.len ()) <= 1)) {
// enum values may not consist solely of digits
common_prefix = common_prefix.ndup (common_prefix.size () - 1);
}
}
en.set_cprefix (common_prefix);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment