[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdebindings/kalyptus
From:       Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date:       2004-09-06 14:53:44
Message-ID: 200409061553.45003.Richard_Dale () tipitina ! demon ! co ! uk
[Download RAW message or body]

On Monday 06 September 2004 11:04, David Faure wrote:
> On Sunday 05 September 2004 20:45, Richard Dale wrote:
> > overriding another when the types of the args aren't identical. Maybe
> > uint might be 32 bits, but unsigned int 64 bits or whatever.
>
> uint is simply short for "unsigned int".
>
> $ grep uint qglobal.h
> typedef unsigned        uint;
Yes, kalyptus has a look up table with that mapping:

%typedeflist =
(
   'signed char' => 'char',
   'unsigned char' => 'uchar',
   'signed short' => 'short',
   'unsigned short' => 'ushort',
   'signed' => 'int',
   'signed int' => 'int',
   'unsigned' => 'uint',
   'unsigned int' => 'uint',
...

So I tried changing the method 'methodSignature()' that derives the type 
signature of a method, to use the table so that 'unsigned int' and 'uint' 
would both map onto a 'uint':

sub methodSignature($$) {
    my $method = shift;
    my $last = shift;
    my $sig = $method->{astNodeName};
    my @argTypeList;
    my $argId = 0;
    foreach my $arg ( @{$method->{ParamList}} ) {
 last if $argId > $last;
        if (exists $typedeflist{$arg->{ArgType}}) {
            push @argTypeList, $typedeflist{$arg->{ArgType}};
        } else {
     push @argTypeList, $arg->{ArgType};
        }
 $argId++;
    }
    $sig .= "(". join(", ",@argTypeList) .")";
    $sig .= " const" if $method->{Flags} =~ "c";
    return $sig;
}

But although that fixed the duplicate virtual methods generation bug, it had 
some unwanted side effects on the rest of the code generation. So for now I'm 
pleased that Joseph has changed the two abstract methods setWordWrapAt() in 
the kate and ktexteditor headers to both have an arg type of 'unsigned int'.

-- Richard
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic