diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-10-26 22:49:45 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2018-10-26 22:49:45 +0900 |
commit | f8f7e1d6ec62741c25c60ebdd71f7222db8af92c (patch) | |
tree | a4a22b7693fedb1d5ae06607e23881b08b90e13a | |
parent | 1db9e19a98953a08ec3409afa310383d3432c0c7 (diff) | |
download | tdebindings-bug/266/move-to-usr.tar.gz tdebindings-bug/266/move-to-usr.zip |
Fixed SEGFAULT when using ruby bindings.bug/266/move-to-usr
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | tqtruby/rubylib/tqtruby/lib/TQt/tqtruby.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tqtruby/rubylib/tqtruby/lib/TQt/tqtruby.rb b/tqtruby/rubylib/tqtruby/lib/TQt/tqtruby.rb index a7489820..4788d01b 100644 --- a/tqtruby/rubylib/tqtruby/lib/TQt/tqtruby.rb +++ b/tqtruby/rubylib/tqtruby/lib/TQt/tqtruby.rb @@ -1349,14 +1349,14 @@ module TQt @@idclass = [] def Internal.normalize_classname(classname) - if classname =~ /^Qext/ - now = classname.sub(/^Qext(?=[A-Z])/,'Qext::') - elsif classname =~ /^Q/ - now = classname.sub(/^Q(?=[A-Z])/,'TQt::') + if classname =~ /^TQext/ + now = classname.sub(/^TQext(?=[A-Z])/,'TQext::') + elsif classname =~ /^TQ/ + now = classname.sub(/^TQ(?=[A-Z])/,'TQt::') elsif classname =~ /^(TDEConfigSkeleton|KWin)::/ - now = classname.sub(/^K?(?=[A-Z])/,'KDE::') + now = classname.sub(/^T?(?=[A-Z])/,'TDE::') elsif classname !~ /::/ - now = classname.sub(/^K?(?=[A-Z])/,'KDE::') + now = classname.sub(/^T?(?=[A-Z])/,'TDE::') else now = classname end @@ -1416,7 +1416,7 @@ module TQt elsif argtype == 's' if typename =~ /^(const )?((TQChar)[*&]?)$/ return 1 - elsif typename =~ /^(?:u?char\*|const u?char\*|(?:const )?(Q(C?)String)[*&]?)$/ + elsif typename =~ /^(?:u?char\*|const u?char\*|(?:const )?(TQ(C?)String)[*&]?)$/ qstring = !$1.nil? c = ("C" == $2) return c ? 2 : (qstring ? 3 : 0) @@ -1437,7 +1437,7 @@ module TQt end elsif argtype == 'u' # Give nil matched against string types a higher score than anything else - if typename =~ /^(?:u?char\*|const u?char\*|(?:const )?((Q(C?)String))[*&]?)$/ + if typename =~ /^(?:u?char\*|const u?char\*|(?:const )?((TQ(C?)String))[*&]?)$/ return 1 # Numerics will give a runtime conversion error, so they fail the match elsif typename =~ /^(?:short|ushort|uint|long|ulong|signed|unsigned|int)$/ |