--- /dev/null
+/* methods_prepostconditions_contains.c generated by valac, the Vala compiler
+ * generated from methods_prepostconditions_contains.vala, do not modify */
+
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+
+#if !defined(VALA_EXTERN)
+#if defined(_MSC_VER)
+#define VALA_EXTERN __declspec(dllexport) extern
+#elif __GNUC__ >= 4
+#define VALA_EXTERN __attribute__((visibility("default"))) extern
+#else
+#define VALA_EXTERN extern
+#endif
+#endif
+
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
+#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
+#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
+
+VALA_EXTERN void foo (const gchar* s);
+static gboolean _vala_string_array_contains (const gchar* * stack,
+ gssize stack_length,
+ const const gchar* needle);
+VALA_EXTERN gchar* bar (void);
+static void _vala_main (void);
+
+const gchar* array[3] = {"foo", "bar", "manam"};
+
+static gboolean
+_vala_string_array_contains (const gchar* * stack,
+ gssize stack_length,
+ const const gchar* needle)
+{
+ gssize i;
+ for (i = 0; i < stack_length; i++) {
+ if (g_strcmp0 (stack[i], needle) == 0) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+void
+foo (const gchar* s)
+{
+ g_return_if_fail (s != NULL);
+ _vala_return_if_fail (_vala_string_array_contains (array, G_N_ELEMENTS (array), s), "s in array");
+}
+
+gchar*
+bar (void)
+{
+ gchar* _tmp0_;
+ gchar* result = NULL;
+ _tmp0_ = g_strdup ("manam");
+ result = _tmp0_;
+ _vala_warn_if_fail (_vala_string_array_contains (array, G_N_ELEMENTS (array), result), "result in array");
+ return result;
+}
+
+static void
+_vala_main (void)
+{
+ gchar* _tmp0_;
+ gchar* _tmp1_;
+ foo ("bar");
+ _tmp0_ = bar ();
+ _tmp1_ = _tmp0_;
+ _g_free0 (_tmp1_);
+}
+
+int
+main (int argc,
+ char ** argv)
+{
+ _vala_main ();
+ return 0;
+}
+
}
}
+ public override void replace_expression (Expression old_node, Expression new_node) {
+ if (preconditions != null) {
+ var index = preconditions.index_of (old_node);
+ if (index >= 0) {
+ preconditions[index] = new_node;
+ new_node.parent_node = this;
+ }
+ }
+ if (postconditions != null) {
+ var index = postconditions.index_of (old_node);
+ if (index >= 0) {
+ postconditions[index] = new_node;
+ new_node.parent_node = this;
+ }
+ }
+ }
+
public override void replace_type (DataType old_type, DataType new_type) {
if (base_interface_type == old_type) {
base_interface_type = new_type;