| OLD | NEW |
| 1 # | 1 # |
| 2 # WebKit IDL parser | 2 # WebKit IDL parser |
| 3 # | 3 # |
| 4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> | 4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> |
| 5 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 5 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
| 6 # Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 6 # Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 9 # | 9 # |
| 10 # This library is free software; you can redistribute it and/or | 10 # This library is free software; you can redistribute it and/or |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 my $wanted = sub { | 257 my $wanted = sub { |
| 258 $idlFiles->{$1} = $File::Find::name if /^([A-Z].*)\.idl$/; | 258 $idlFiles->{$1} = $File::Find::name if /^([A-Z].*)\.idl$/; |
| 259 $File::Find::prune = 1 if /^\../; | 259 $File::Find::prune = 1 if /^\../; |
| 260 }; | 260 }; |
| 261 find($wanted, @directories); | 261 find($wanted, @directories); |
| 262 } | 262 } |
| 263 | 263 |
| 264 return $idlFiles->{$interfaceName}; | 264 return $idlFiles->{$interfaceName}; |
| 265 } | 265 } |
| 266 | 266 |
| 267 sub HFileForInterface |
| 268 { |
| 269 my $object = shift; |
| 270 my $interfaceName = shift; |
| 271 |
| 272 my $idlFilename = $object->IDLFileForInterface($interfaceName) |
| 273 or die("Could NOT find IDL file for interface \"$interfaceName\"!\n"); |
| 274 |
| 275 my $sourceRoot = $ENV{SOURCE_ROOT}; |
| 276 if ($idlFilename =~ /^$sourceRoot/) { |
| 277 $idlFilename = substr($idlFilename, length($sourceRoot) + 1); |
| 278 } |
| 279 $idlFilename = "bindings/" . $idlFilename; |
| 280 #print "${interfaceName}, ${idlFilename}, ${sourceRoot}\n"; |
| 281 $idlFilename =~ s/idl$/h/; |
| 282 return $idlFilename; |
| 283 } |
| 284 |
| 267 sub ParseInterface | 285 sub ParseInterface |
| 268 { | 286 { |
| 269 my $object = shift; | 287 my $object = shift; |
| 270 my $interfaceName = shift; | 288 my $interfaceName = shift; |
| 271 | 289 |
| 272 return undef if $interfaceName eq 'Object'; | 290 return undef if $interfaceName eq 'Object'; |
| 273 | 291 |
| 274 if (exists $cachedInterfaces->{$interfaceName}) { | 292 if (exists $cachedInterfaces->{$interfaceName}) { |
| 275 return $cachedInterfaces->{$interfaceName}; | 293 return $cachedInterfaces->{$interfaceName}; |
| 276 } | 294 } |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { | 780 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { |
| 763 $found = 1; | 781 $found = 1; |
| 764 } | 782 } |
| 765 return 1 if $found; | 783 return 1 if $found; |
| 766 }, 0); | 784 }, 0); |
| 767 | 785 |
| 768 return $found; | 786 return $found; |
| 769 } | 787 } |
| 770 | 788 |
| 771 1; | 789 1; |
| OLD | NEW |