~ubuntu-branches/ubuntu/quantal/vala/quantal

« back to all changes in this revision

Viewing changes to vapigen/valavapicheck.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2011-01-18 09:51:15 UTC
  • mfrom: (1.5.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20110118095115-r2jr7c63lr0jzj0y
Tags: 0.11.4-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
static gint _vala_array_length (gpointer array);
112
112
 
113
113
 
114
 
static const gchar* string_offset (const gchar* self, glong offset) {
115
 
        const gchar* result = NULL;
116
 
        g_return_val_if_fail (self != NULL, NULL);
117
 
        result = (const gchar*) (((gchar*) self) + offset);
118
 
        return result;
119
 
}
120
 
 
121
 
 
122
114
static gchar* string_substring (const gchar* self, glong offset, glong len) {
123
115
        gchar* result = NULL;
124
116
        gint _tmp0_;
125
117
        glong string_length;
126
 
        const gchar* _tmp1_ = NULL;
127
 
        const gchar* start;
128
 
        const gchar* _tmp2_ = NULL;
129
 
        gchar* _tmp3_ = NULL;
 
118
        gchar* _tmp1_ = NULL;
130
119
        g_return_val_if_fail (self != NULL, NULL);
131
120
        _tmp0_ = strlen (self);
132
121
        string_length = (glong) _tmp0_;
140
129
                len = string_length - offset;
141
130
        }
142
131
        g_return_val_if_fail ((offset + len) <= string_length, NULL);
143
 
        _tmp1_ = string_offset (self, offset);
144
 
        start = _tmp1_;
145
 
        _tmp2_ = string_offset (start, len);
146
 
        _tmp3_ = g_strndup (start, ((gchar*) _tmp2_) - ((gchar*) start));
147
 
        result = _tmp3_;
 
132
        _tmp1_ = g_strndup (((gchar*) self) + offset, (gsize) len);
 
133
        result = _tmp1_;
148
134
        return result;
149
135
}
150
136