~ubuntu-branches/ubuntu/vivid/vala/vivid

« back to all changes in this revision

Viewing changes to codegen/valagasyncmodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-09-05 10:32:13 UTC
  • mfrom: (1.5.9 upstream) (28.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20100905103213-8nn88erk20o4wgm3
Tags: 0.9.8-1
New upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1283
1283
}
1284
1284
 
1285
1285
 
 
1286
static glong string_get_length (const char* self) {
 
1287
        glong result;
 
1288
        g_return_val_if_fail (self != NULL, 0L);
 
1289
        result = g_utf8_strlen (self, (gssize) (-1));
 
1290
        return result;
 
1291
}
 
1292
 
 
1293
 
1286
1294
static char* string_substring (const char* self, glong offset, glong len) {
1287
1295
        char* result = NULL;
1288
1296
        glong string_length;
1289
1297
        const char* start;
1290
1298
        g_return_val_if_fail (self != NULL, NULL);
1291
 
        string_length = g_utf8_strlen (self, -1);
 
1299
        string_length = string_get_length (self);
1292
1300
        if (offset < 0) {
1293
1301
                offset = string_length + offset;
1294
1302
                g_return_val_if_fail (offset >= 0, NULL);