[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebindings/kalyptus
From: Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date: 2004-01-28 16:16:49
Message-ID: 20040128161649.61EE3A018 () office ! kde ! org
[Download RAW message or body]
CVS commit by rdale:
* When two methods differed only in 'constness', it wasn't possible to
resolve which to call from ruby. For example:
KProgress* progressBar();
const KProgress* progressBar() const;
So only the const variant is generated in the Smoke runtime.
M +16 -0 ChangeLog 1.30
M +23 -1 kalyptusCxxToSmoke.pm 1.84
--- kdebindings/kalyptus/ChangeLog #1.29:1.30
@@ -1,2 +1,18 @@
+2004-01-28 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
+
+ * When two methods differed only in 'constness', it wasn't possible to
+ resolve which to call from ruby. For example:
+ KProgress* progressBar();
+ const KProgress* progressBar() const;
+ So only the const variant is generated in the Smoke runtime.
+
+2004-01-05 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
+
+ * When a java method needed to be renamed, because in the type signature
+ only the return type differed in C++, when that isn't allowed in java,
+ the JNI function name was not using the new name.
+ * Fixed error in JNI function names when the C++ method had an underscore.
+
+
2003-12-29 Richard Dale <Richard_Dale@tipitina.demon.co.uk>
--- kdebindings/kalyptus/kalyptusCxxToSmoke.pm #1.83:1.84
@@ -402,4 +402,5 @@
|| ($classNode->{astNodeName} eq 'KFileDialog' and $name eq \
'addDirEntry')
|| ($classNode->{astNodeName} eq 'KFileDialog' and $name eq \
'getDirEntry') + || ($classNode->{astNodeName} eq 'KFileItem' \
and $name eq 'extraData')
|| ($classNode->{astNodeName} eq 'KFileView' and $name eq \
'selectionMode')
|| ($classNode->{astNodeName} eq 'KFind' and $name eq \
'KFind' and @{$m->{ParamList}} == 4) @@ -1644,4 +1645,18 @@
}, undef );
+ my %const_methods = ();
+ # Now look at all const methods for this class, in order to use
+ # them in preference to any otherwise identical non-const method
+ Iter::MembersByType ( $classNode, undef,
+ sub { my ($classNode, $m ) = @_;
+
+ next unless $m->{NodeType} eq 'method';
+ my @args = @{ $m->{ParamList} };
+ my $sig = methodSignature( $m, $#args );
+ if ( $sig =~ /(.*) const$/ ) {
+ $const_methods{$1} = 1;
+ }
+
+ }, undef );
# Now look at all methods for this class
@@ -1678,9 +1693,16 @@
my @args = @{ $m->{ParamList} };
+ my $sig = methodSignature( $m, $#args );
+ if ( $const_methods{$sig} && $m->{Flags} !~ "v" ) {
+ # If there is a method which just differs from another by \
'constness', + # then ignore the non-const version
+ $m->{SkipFromSwitch} = 1;
+ next;
+ }
my $last = $m->{FirstDefaultParam};
$last = scalar @args unless defined $last;
my $iterationCount = scalar(@args) - $last;
while($iterationCount >= 0) {
- my $sig = methodSignature( $m, $#args );
+ $sig = methodSignature( $m, $#args );
$classNode->{case}{$sig} = $methodNumber;
#print STDERR "prepareCaseDict: registered case number $methodNumber for \
$sig in $className()\n" if ($debug);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic