This file is indexed.

/usr/share/pyshared/pygccxml/declarations/dependencies.py is in python-pygccxml 1.0.0-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

"""
this module contains class that keeps dependency information of some declaration
"""

import cpptypes

class dependency_info_t( object ):
    def __init__( self, declaration, depend_on_it, access_type=None, hint=None ):
        object.__init__( self )
        #prevent recursive import
        import class_declaration
        assert isinstance( depend_on_it, ( class_declaration.class_t, cpptypes.type_t ) )
        self._declaration = declaration
        self._depend_on_it = depend_on_it
        self._access_type = access_type
        self._hint = hint
        
    @property
    def declaration( self ):
        return self._declaration
    #short name
    decl = declaration

    @property 
    def depend_on_it( self ):
        return self._depend_on_it
    
    def _get_access_type( self ):
        return self._access_type
    def _set_access_type( self, access_type ):
        self._access_type = access_type   
    access_type = property( _get_access_type, _set_access_type )

    def __str__( self ):
        return 'declaration "%s" depends( %s ) on "%s" ' \
               % ( self.declaration, self.access_type, self.depend_on_it )

    @property
    def hint(self):
        """the declaration, that report dependency can put some additional inforamtion
        about dependency. It can be used later"""
        return self._hint

    def find_out_depend_on_declaration( self ):
        """if declaration depends on other declaration and not on some type
           this function will return reference to it. Otherwise None will be returned
        """
        #prevent recursive import
        from pygccxml import declarations
        
        if isinstance( self.depend_on_it, declarations.declaration_t ):
            return self.depend_on_it
        base_type = declarations.base_type( declarations.remove_alias( self.depend_on_it ) )
        if isinstance( base_type, cpptypes.declarated_t ):
            return base_type.declaration
        return None