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

« back to all changes in this revision

Viewing changes to compiler/valacompiler.vala

  • 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:
160
160
                        // strip extension if there is one
161
161
                        // else we use the default output file of the C compiler
162
162
                        if (sources[0].rchr (-1, '.') != null) {
163
 
                                long dot = sources[0].pointer_to_offset (sources[0].rchr (-1, '.'));
 
163
                                long dot = (long) ((char*) sources[0].rchr (-1, '.') - (char*) sources[0]);
164
164
                                output = Path.get_basename (sources[0].substring (0, dot));
165
165
                        }
166
166
                }
380
380
                                        if (last_hyphen == null || !gir.has_suffix (".gir")) {
381
381
                                                Report.error (null, "GIR file name `%s' is not well-formed, expected NAME-VERSION.gir".printf (gir));
382
382
                                        } else {
383
 
                                                long offset = gir.pointer_to_offset (last_hyphen);
 
383
                                                long offset = (long) ((char*) last_hyphen - (char*) gir);
384
384
                                                string gir_namespace = gir.substring (0, offset);
385
385
                                                string gir_version = gir.substring (offset + 1, gir_len - offset - 5);
386
386
                                                gir_version.canon ("0123456789.", '?');