summaryrefslogtreecommitdiff
path: root/vapigen
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2011-01-15 21:16:09 +0100
committerJürg Billeter <j@bitron.ch>2011-01-15 21:17:35 +0100
commitdf95dc3a1ae870cadbbbeb2ca9bfeb2805159a28 (patch)
tree5c3e0000ce8c5c69f011c13f8d418f4f56bad0d0 /vapigen
parent9c9c5a178cca7ddb221336597585f0c75d570333 (diff)
downloadvala-df95dc3a1ae870cadbbbeb2ca9bfeb2805159a28.tar.gz
glib-2.0: Add string.index_of_char
This deprecates string.chr.
Diffstat (limited to 'vapigen')
-rw-r--r--vapigen/valagidlparser.vala10
1 files changed, 5 insertions, 5 deletions
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala
index ccc6e4f6c..16c95dbec 100644
--- a/vapigen/valagidlparser.vala
+++ b/vapigen/valagidlparser.vala
@@ -124,7 +124,7 @@ public class Vala.GIdlParser : CodeVisitor {
continue;
}
- if (null != tokens[0].chr (-1, '*')) {
+ if (-1 != tokens[0].index_of_char ('*')) {
PatternSpec* pattern = new PatternSpec (tokens[0]);
codenode_attributes_patterns[pattern] = tokens[0];
}
@@ -2621,15 +2621,15 @@ public class Vala.GIdlParser : CodeVisitor {
var attributes = codenode_attributes_map.get (codenode);
if (attributes == null) {
- var dot_required = (null != codenode.chr (-1, '.'));
- var colon_required = (null != codenode.chr (-1, ':'));
+ var dot_required = (-1 != codenode.index_of_char ('.'));
+ var colon_required = (-1 != codenode.index_of_char (':'));
var pattern_specs = codenode_attributes_patterns.get_keys ();
foreach (PatternSpec* pattern in pattern_specs) {
var pspec = codenode_attributes_patterns[pattern];
- if ((dot_required && null == pspec.chr (-1, '.')) ||
- (colon_required && null == pspec.chr (-1, ':'))) {
+ if ((dot_required && -1 != pspec.index_of_char ('.')) ||
+ (colon_required && -1 != pspec.index_of_char (':'))) {
continue;
}