decl.write (writer);
}
- if (CCodeModifiers.DEPRECATED in modifiers) {
- writer.write_string (" G_GNUC_DEPRECATED");
- }
-
writer.write_string (";");
writer.write_newline ();
return;
writer.write_string (")");
+ if (CCodeModifiers.DEPRECATED in modifiers) {
+ writer.write_string (" G_GNUC_DEPRECATED");
+ }
+
if (CCodeModifiers.PRINTF in modifiers) {
format_arg_index = (format_arg_index >= 0 ? format_arg_index + 1 : args_index);
writer.write_string (" G_GNUC_PRINTF(%d,%d)".printf (format_arg_index, args_index + 1));
} else if (m.scanf_format) {
func.modifiers |= CCodeModifiers.SCANF;
}
+
+ if (m.version.deprecated) {
+ func.modifiers |= CCodeModifiers.DEPRECATED;
+ }
}
public void generate_vfunc (Method m, DataType return_type, Map<int,CCodeParameter> cparam_map, Map<int,CCodeExpression> carg_map, string suffix = "", int direction = 3) {
vfunc.modifiers |= CCodeModifiers.SCANF;
}
+ if (m.version.deprecated) {
+ vfunc.modifiers |= CCodeModifiers.DEPRECATED;
+ }
+
cfile.add_function (vfunc);
pop_context ();
vdeclarator.modifiers |= CCodeModifiers.SCANF;
}
+ if (m.version.deprecated) {
+ vdeclarator.modifiers |= CCodeModifiers.DEPRECATED;
+ }
+
generate_cparameters (m, decl_space, cparam_map, new CCodeFunction ("fake"), vdeclarator);
var vdecl = new CCodeDeclaration (get_ccode_name (creturn_type));
+[Version (deprecated = true)]
+int bar = 42;
+
+[Version (deprecated = true)]
+void baz () {
+}
+
[Version (deprecated = true)]
delegate void FooDelegate ();
[Version (deprecated = true)]
class FooClass : Object {
+ [Version (deprecated = true)]
+ public static int manam = 42;
[Version (deprecated = true)]
public int bar { get; set; default = 42; }
[Version (deprecated = true)]
public int baz;
+ [Version (deprecated = true)]
+ public int foo () {
+ return 42;
+ }
+ [Version (deprecated = true)]
+ public virtual int foov () {
+ return 42;
+ }
+}
+
+[Version (deprecated = true)]
+abstract class AFoo : Object {
+ [Version (deprecated = true)]
+ public int foo () {
+ return 42;
+ }
+ [Version (deprecated = true)]
+ public abstract int fooa ();
+}
+
+[Version (deprecated = true)]
+interface IFoo : Object {
+ [Version (deprecated = true)]
+ public int foo () {
+ return 42;
+ }
+ [Version (deprecated = true)]
+ public abstract void fooa ();
}
void test_class_property () {