diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-06-18 02:38:19 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-06-18 02:38:19 +0200 |
commit | ee9b1e7dc5f8db9bb39ce95a8daf129efff39b53 (patch) | |
tree | 1e65ae9bbdf17546d8c290d2384d45abe8be95c0 /kalyptus/kalyptus | |
parent | 256d241873a67c99d66c3ff52a64858678462a50 (diff) | |
download | tdebindings-ee9b1e7dc5f8db9bb39ce95a8daf129efff39b53.tar.gz tdebindings-ee9b1e7dc5f8db9bb39ce95a8daf129efff39b53.zip |
Merge fixes for kalyptus that were made in tdelibs/dcopidlng:
+ includes may use quotation marks
+ argument types can contain multiple words
+ avoid use long, short, int or char type as the argument name
+ avoid use type as the argument name if the const qualifier is used
+ use long notation of int types
+ the arguments can be nameless
+ return types can have qualifiers
+ do not warn on inherit of the DCOPObject and TQObject classes
+ the documentation comment does not have to end on a separate line
+ do not skip an empty class if it is declared with K_DCOP
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kalyptus/kalyptus')
-rw-r--r-- | kalyptus/kalyptus | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/kalyptus/kalyptus b/kalyptus/kalyptus index ede21d42..596f6c59 100644 --- a/kalyptus/kalyptus +++ b/kalyptus/kalyptus @@ -559,7 +559,7 @@ LOOP: || $p =~ /^\s*Q_DECLARE_SHARED/ ); - push @includes_list, $1 if $p =~ /^#include\s+<?(.*?)>?\s*$/; + push @includes_list, $1 if $p =~ /^#include\s+[<"]?(.*?)[>"]?\s*$/; # remove all preprocessor macros if( $p =~ /^\s*#\s*(\w+)/ ) { @@ -1692,16 +1692,22 @@ sub makeParamList($$$) # Separate arg type from arg name, if the latter is specified if ( $arg =~ /(.*)\s+([\w_]+)\s*$/ || $arg =~ /(.*)\(\s*\*\s([\w_]+)\)\s*\((.*)\)\s*$/ ) { - if ( defined $3 ) { # function pointer - $argType = $1."(*)($3)"; - $argName = $2; - } else { - $argType = $1; - $argName = $2; - } - } else { # unnamed arg - or enum value - $argType = $arg if (!$isEnum); - $argName = $arg if ($isEnum); + if ( $1 eq "const" || $2 eq "long" || $2 eq "short" || $2 eq "int" || $2 eq "char" ) { + # const qualifier or long notation of numeric type + # without argument name + $argType = "$1 $2"; + } else { + $argType = $1; + $argName = $2; + } + if ( defined $3 ) { + # function pointer + $argType .= "(*)($3)"; + } + } else { + # unnamed arg - or enum value + $argType = $arg if (!$isEnum); + $argName = $arg if ($isEnum); } $argId++; |