~ubuntu-branches/ubuntu/wily/vala/wily

« back to all changes in this revision

Viewing changes to codegen/valaccodemethodmodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2011-02-15 11:44:25 UTC
  • mfrom: (1.5.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20110215114425-8vtvfqmnely5x8tt
Tags: 0.11.6-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
        void (*generate_cparameters) (ValaCCodeBaseModule* self, ValaMethod* m, ValaCCodeFile* decl_space, ValaMap* cparam_map, ValaCCodeFunction* func, ValaCCodeFunctionDeclarator* vdeclarator, ValaMap* carg_map, ValaCCodeFunctionCall* vcall, gint direction);
173
173
        ValaCCodeExpression* (*get_dup_func_expression) (ValaCCodeBaseModule* self, ValaDataType* type, ValaSourceReference* source_reference, gboolean is_chainup);
174
174
        gchar* (*append_struct_array_free) (ValaCCodeBaseModule* self, ValaStruct* st);
 
175
        ValaCCodeExpression* (*destroy_variable) (ValaCCodeBaseModule* self, ValaVariable* variable, ValaCCodeExpression* inner);
175
176
        ValaCCodeExpression* (*destroy_value) (ValaCCodeBaseModule* self, ValaTargetValue* value, gboolean is_macro_definition);
176
177
        void (*append_local_free) (ValaCCodeBaseModule* self, ValaSymbol* sym, gboolean stop_at_loop, ValaCodeNode* stop_at);
177
178
        ValaTargetValue* (*get_variable_cvalue) (ValaCCodeBaseModule* self, ValaVariable* variable, ValaCCodeExpression* inner);
 
179
        ValaTargetValue* (*load_parameter) (ValaCCodeBaseModule* self, ValaParameter* param);
178
180
        gchar* (*get_delegate_target_cname) (ValaCCodeBaseModule* self, const gchar* delegate_cname);
179
181
        ValaCCodeExpression* (*get_delegate_target_cexpression) (ValaCCodeBaseModule* self, ValaExpression* delegate_expr, ValaCCodeExpression** delegate_target_destroy_notify);
180
182
        ValaCCodeExpression* (*get_delegate_target_cvalue) (ValaCCodeBaseModule* self, ValaTargetValue* value);
4279
4281
 
4280
4282
static gchar* string_substring (const gchar* self, glong offset, glong len) {
4281
4283
        gchar* result = NULL;
4282
 
        gint _tmp0_;
4283
 
        glong string_length;
4284
 
        gchar* _tmp1_ = NULL;
 
4284
        glong string_length = 0L;
 
4285
        gboolean _tmp0_ = FALSE;
 
4286
        gchar* _tmp3_ = NULL;
4285
4287
        g_return_val_if_fail (self != NULL, NULL);
4286
 
        _tmp0_ = strlen (self);
4287
 
        string_length = (glong) _tmp0_;
 
4288
        if (offset >= 0) {
 
4289
                _tmp0_ = len >= 0;
 
4290
        } else {
 
4291
                _tmp0_ = FALSE;
 
4292
        }
 
4293
        if (_tmp0_) {
 
4294
                glong _tmp1_;
 
4295
                _tmp1_ = strnlen ((gchar*) self, (gsize) (offset + len));
 
4296
                string_length = _tmp1_;
 
4297
        } else {
 
4298
                gint _tmp2_;
 
4299
                _tmp2_ = strlen (self);
 
4300
                string_length = (glong) _tmp2_;
 
4301
        }
4288
4302
        if (offset < 0) {
4289
4303
                offset = string_length + offset;
4290
4304
                g_return_val_if_fail (offset >= 0, NULL);
4295
4309
                len = string_length - offset;
4296
4310
        }
4297
4311
        g_return_val_if_fail ((offset + len) <= string_length, NULL);
4298
 
        _tmp1_ = g_strndup (((gchar*) self) + offset, (gsize) len);
4299
 
        result = _tmp1_;
 
4312
        _tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
 
4313
        result = _tmp3_;
4300
4314
        return result;
4301
4315
}
4302
4316