diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 | |
parent | 657bc3d9848e3be92029b2416031340988cd0111 (diff) | |
download | src-13cc256e404620c1de0cbcc4e43ce1e2dbbc4898.tar.gz src-13cc256e404620c1de0cbcc4e43ce1e2dbbc4898.zip |
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):vendor/clang/clang-release_32-r168974
Notes
Notes:
svn path=/vendor/clang/dist/; revision=243791
svn path=/vendor/clang/clang-release_32-r168974/; revision=243792; tag=vendor/clang/clang-release_32-r168974
2195 files changed, 118236 insertions, 46303 deletions
diff --git a/.gitignore b/.gitignore index b906ab919cbe..6be9976262a8 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ *.pyc # vim swap files .*.swp +.sw? #==============================================================================# # Explicit files to ignore (only matches one). diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f4fa1cb5d7a..53d4165caec3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -181,16 +181,26 @@ endfunction(clang_tablegen) macro(add_clang_library name) llvm_process_sources(srcs ${ARGN}) if(MSVC_IDE OR XCODE) - string( REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR}) - list( GET split_path -1 dir) - file( GLOB_RECURSE headers - ../../../include/clang/StaticAnalyzer${dir}/*.h - ../../../include/clang/StaticAnalyzer${dir}/*.td - ../../../include/clang/StaticAnalyzer${dir}/*.def - ../../include/clang${dir}/*.h - ../../include/clang${dir}/*.td - ../../include/clang${dir}/*.def) - set(srcs ${srcs} ${headers}) + # Add public headers + file(RELATIVE_PATH lib_path + ${CLANG_SOURCE_DIR}/lib/ + ${CMAKE_CURRENT_SOURCE_DIR} + ) + if(NOT lib_path MATCHES "^[.][.]") + file( GLOB_RECURSE headers + ${CLANG_SOURCE_DIR}/include/clang/${lib_path}/*.h + ${CLANG_SOURCE_DIR}/include/clang/${lib_path}/*.def + ) + set_source_files_properties(${headers} PROPERTIES HEADER_FILE_ONLY ON) + + file( GLOB_RECURSE tds + ${CLANG_SOURCE_DIR}/include/clang/${lib_path}/*.td + ) + source_group("TableGen descriptions" FILES ${tds}) + set_source_files_properties(${tds}} PROPERTIES HEADER_FILE_ONLY ON) + + set(srcs ${srcs} ${headers} ${tds}) + endif() endif(MSVC_IDE OR XCODE) if (MODULE) set(libkind MODULE) @@ -27,6 +27,10 @@ ifeq ($(MAKECMDGOALS),libs-only) DIRS := $(filter-out tools docs, $(DIRS)) OPTIONAL_DIRS := endif +ifeq ($(BUILD_CLANG_ONLY),YES) + DIRS := $(filter-out docs unittests, $(DIRS)) + OPTIONAL_DIRS := +endif ### # Common Makefile code, shared by all Clang Makefiles. diff --git a/NOTES.txt b/NOTES.txt index ca46d1cae478..1c89d685729b 100644 --- a/NOTES.txt +++ b/NOTES.txt @@ -44,7 +44,7 @@ TODO: File Manager Speedup: 2. Instead of stat'ing the file in FileManager::getFile, check to see if the dir has been read. If so, fail immediately, if not, read the dir, then retry. - 3. Reading the dir uses the getdirentries syscall, creating an FileEntry + 3. Reading the dir uses the getdirentries syscall, creating a FileEntry for all files found. //===---------------------------------------------------------------------===// diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py index fc0a2a18bb40..5e162c0e8349 100644 --- a/bindings/python/clang/cindex.py +++ b/bindings/python/clang/cindex.py @@ -67,26 +67,12 @@ import collections import clang.enumerations -def get_cindex_library(): - # FIXME: It's probably not the case that the library is actually found in - # this location. We need a better system of identifying and loading the - # CIndex library. It could be on path or elsewhere, or versioned, etc. - import platform - name = platform.system() - if name == 'Darwin': - return cdll.LoadLibrary('libclang.dylib') - elif name == 'Windows': - return cdll.LoadLibrary('libclang.dll') - else: - return cdll.LoadLibrary('libclang.so') - # ctypes doesn't implicitly convert c_void_p to the appropriate wrapper # object. This is a problem, because it means that from_parameter will see an # integer and pass the wrong value on platforms where int != void*. Work around # this by marshalling object arguments as void**. c_object_p = POINTER(c_void_p) -lib = get_cindex_library() callbacks = {} ### Exception Classes ### @@ -133,18 +119,43 @@ class TranslationUnitSaveError(Exception): ### Structures and Utility Classes ### +class CachedProperty(object): + """Decorator that lazy-loads the value of a property. + + The first time the property is accessed, the original property function is + executed. The value it returns is set as the new value of that instance's + property, replacing the original method. + """ + + def __init__(self, wrapped): + self.wrapped = wrapped + try: + self.__doc__ = wrapped.__doc__ + except: + pass + + def __get__(self, instance, instance_type=None): + if instance is None: + return self + + value = self.wrapped(instance) + setattr(instance, self.wrapped.__name__, value) + + return value + + class _CXString(Structure): """Helper for transforming CXString results.""" _fields_ = [("spelling", c_char_p), ("free", c_int)] def __del__(self): - lib.clang_disposeString(self) + conf.lib.clang_disposeString(self) @staticmethod def from_result(res, fn, args): assert isinstance(res, _CXString) - return lib.clang_getCString(res) + return conf.lib.clang_getCString(res) class SourceLocation(Structure): """ @@ -156,7 +167,7 @@ class SourceLocation(Structure): def _get_instantiation(self): if self._data is None: f, l, c, o = c_object_p(), c_uint(), c_uint(), c_uint() - lib.clang_getInstantiationLocation(self, byref(f), byref(l), + conf.lib.clang_getInstantiationLocation(self, byref(f), byref(l), byref(c), byref(o)) if f: f = File(f) @@ -171,7 +182,7 @@ class SourceLocation(Structure): Retrieve the source location associated with a given file/line/column in a particular translation unit. """ - return lib.clang_getLocation(tu, file, line, column) + return conf.lib.clang_getLocation(tu, file, line, column) @staticmethod def from_offset(tu, file, offset): @@ -181,7 +192,7 @@ class SourceLocation(Structure): file -- File instance to obtain offset from offset -- Integer character offset within file """ - return lib.clang_getLocationForOffset(tu, file, offset) + return conf.lib.clang_getLocationForOffset(tu, file, offset) @property def file(self): @@ -204,7 +215,7 @@ class SourceLocation(Structure): return self._get_instantiation()[3] def __eq__(self, other): - return lib.clang_equalLocations(self, other) + return conf.lib.clang_equalLocations(self, other) def __ne__(self, other): return not self.__eq__(other) @@ -231,7 +242,7 @@ class SourceRange(Structure): # object. @staticmethod def from_locations(start, end): - return lib.clang_getRange(start, end) + return conf.lib.clang_getRange(start, end) @property def start(self): @@ -239,7 +250,7 @@ class SourceRange(Structure): Return a SourceLocation representing the first character within a source range. """ - return lib.clang_getRangeStart(self) + return conf.lib.clang_getRangeStart(self) @property def end(self): @@ -247,10 +258,10 @@ class SourceRange(Structure): Return a SourceLocation representing the last character within a source range. """ - return lib.clang_getRangeEnd(self) + return conf.lib.clang_getRangeEnd(self) def __eq__(self, other): - return lib.clang_equalRanges(self, other) + return conf.lib.clang_equalRanges(self, other) def __ne__(self, other): return not self.__eq__(other) @@ -275,19 +286,19 @@ class Diagnostic(object): self.ptr = ptr def __del__(self): - lib.clang_disposeDiagnostic(self) + conf.lib.clang_disposeDiagnostic(self) @property def severity(self): - return lib.clang_getDiagnosticSeverity(self) + return conf.lib.clang_getDiagnosticSeverity(self) @property def location(self): - return lib.clang_getDiagnosticLocation(self) + return conf.lib.clang_getDiagnosticLocation(self) @property def spelling(self): - return lib.clang_getDiagnosticSpelling(self) + return conf.lib.clang_getDiagnosticSpelling(self) @property def ranges(self): @@ -296,12 +307,12 @@ class Diagnostic(object): self.diag = diag def __len__(self): - return int(lib.clang_getDiagnosticNumRanges(self.diag)) + return int(conf.lib.clang_getDiagnosticNumRanges(self.diag)) def __getitem__(self, key): if (key >= len(self)): raise IndexError - return lib.clang_getDiagnosticRange(self.diag, key) + return conf.lib.clang_getDiagnosticRange(self.diag, key) return RangeIterator(self) @@ -312,11 +323,11 @@ class Diagnostic(object): self.diag = diag def __len__(self): - return int(lib.clang_getDiagnosticNumFixIts(self.diag)) + return int(conf.lib.clang_getDiagnosticNumFixIts(self.diag)) def __getitem__(self, key): range = SourceRange() - value = lib.clang_getDiagnosticFixIt(self.diag, key, + value = conf.lib.clang_getDiagnosticFixIt(self.diag, key, byref(range)) if len(value) == 0: raise IndexError @@ -328,25 +339,25 @@ class Diagnostic(object): @property def category_number(self): """The category number for this diagnostic.""" - return lib.clang_getDiagnosticCategory(self) + return conf.lib.clang_getDiagnosticCategory(self) @property def category_name(self): """The string name of the category for this diagnostic.""" - return lib.clang_getDiagnosticCategoryName(self.category_number) + return conf.lib.clang_getDiagnosticCategoryName(self.category_number) @property def option(self): """The command-line option that enables this diagnostic.""" - return lib.clang_getDiagnosticOption(self, None) + return conf.lib.clang_getDiagnosticOption(self, None) @property def disable_option(self): """The command-line option that disables this diagnostic.""" disable = _CXString() - lib.clang_getDiagnosticOption(self, byref(disable)) + conf.lib.clang_getDiagnosticOption(self, byref(disable)) - return lib.clang_getCString(disable) + return conf.lib.clang_getCString(disable) def __repr__(self): return "<Diagnostic severity %r, location %r, spelling %r>" % ( @@ -389,7 +400,7 @@ class TokenGroup(object): self._count = count def __del__(self): - lib.clang_disposeTokens(self._tu, self._memory, self._count) + conf.lib.clang_disposeTokens(self._tu, self._memory, self._count) @staticmethod def get_tokens(tu, extent): @@ -401,7 +412,7 @@ class TokenGroup(object): tokens_memory = POINTER(Token)() tokens_count = c_uint() - lib.clang_tokenize(tu, extent, byref(tokens_memory), + conf.lib.clang_tokenize(tu, extent, byref(tokens_memory), byref(tokens_count)) count = int(tokens_count.value) @@ -507,39 +518,39 @@ class CursorKind(object): def is_declaration(self): """Test if this is a declaration kind.""" - return lib.clang_isDeclaration(self) + return conf.lib.clang_isDeclaration(self) def is_reference(self): """Test if this is a reference kind.""" - return lib.clang_isReference(self) + return conf.lib.clang_isReference(self) def is_expression(self): """Test if this is an expression kind.""" - return lib.clang_isExpression(self) + return conf.lib.clang_isExpression(self) def is_statement(self): """Test if this is a statement kind.""" - return lib.clang_isStatement(self) + return conf.lib.clang_isStatement(self) def is_attribute(self): """Test if this is an attribute kind.""" - return lib.clang_isAttribute(self) + return conf.lib.clang_isAttribute(self) def is_invalid(self): """Test if this is an invalid kind.""" - return lib.clang_isInvalid(self) + return conf.lib.clang_isInvalid(self) def is_translation_unit(self): """Test if this is a translation unit kind.""" - return lib.clang_isTranslationUnit(self) + return conf.lib.clang_isTranslationUnit(self) def is_preprocessing(self): """Test if this is a preprocessing kind.""" - return lib.clang_isPreprocessing(self) + return conf.lib.clang_isPreprocessing(self) def is_unexposed(self): """Test if this is an unexposed kind.""" - return lib.clang_isUnexposed(self) + return conf.lib.clang_isUnexposed(self) def __repr__(self): return 'CursorKind.%s' % (self.name,) @@ -643,7 +654,7 @@ CursorKind.TEMPLATE_TYPE_PARAMETER = CursorKind(27) CursorKind.TEMPLATE_NON_TYPE_PARAMETER = CursorKind(28) # A C++ template template parameter. -CursorKind.TEMPLATE_TEMPLATE_PARAMTER = CursorKind(29) +CursorKind.TEMPLATE_TEMPLATE_PARAMETER = CursorKind(29) # A C++ function template. CursorKind.FUNCTION_TEMPLATE = CursorKind(30) @@ -1038,13 +1049,13 @@ class Cursor(Structure): def from_location(tu, location): # We store a reference to the TU in the instance so the TU won't get # collected before the cursor. - cursor = lib.clang_getCursor(tu, location) + cursor = conf.lib.clang_getCursor(tu, location) cursor._tu = tu return cursor def __eq__(self, other): - return lib.clang_equalCursors(self, other) + return conf.lib.clang_equalCursors(self, other) def __ne__(self, other): return not self.__eq__(other) @@ -1054,13 +1065,13 @@ class Cursor(Structure): Returns true if the declaration pointed at by the cursor is also a definition of that entity. """ - return lib.clang_isCursorDefinition(self) + return conf.lib.clang_isCursorDefinition(self) def is_static_method(self): """Returns True if the cursor refers to a C++ member function or member function template that is declared 'static'. """ - return lib.clang_CXXMethod_isStatic(self) + return conf.lib.clang_CXXMethod_isStatic(self) def get_definition(self): """ @@ -1070,7 +1081,7 @@ class Cursor(Structure): """ # TODO: Should probably check that this is either a reference or # declaration prior to issuing the lookup. - return lib.clang_getCursorDefinition(self) + return conf.lib.clang_getCursorDefinition(self) def get_usr(self): """Return the Unified Symbol Resultion (USR) for the entity referenced @@ -1081,7 +1092,7 @@ class Cursor(Structure): program. USRs can be compared across translation units to determine, e.g., when references in one translation refer to an entity defined in another translation unit.""" - return lib.clang_getCursorUSR(self) + return conf.lib.clang_getCursorUSR(self) @property def kind(self): @@ -1096,7 +1107,7 @@ class Cursor(Structure): # this, for consistency with clang_getCursorUSR. return None if not hasattr(self, '_spelling'): - self._spelling = lib.clang_getCursorSpelling(self) + self._spelling = conf.lib.clang_getCursorSpelling(self) return self._spelling @@ -1110,7 +1121,7 @@ class Cursor(Structure): class template specialization. """ if not hasattr(self, '_displayname'): - self._displayname = lib.clang_getCursorDisplayName(self) + self._displayname = conf.lib.clang_getCursorDisplayName(self) return self._displayname @@ -1121,7 +1132,7 @@ class Cursor(Structure): pointed at by the cursor. """ if not hasattr(self, '_loc'): - self._loc = lib.clang_getCursorLocation(self) + self._loc = conf.lib.clang_getCursorLocation(self) return self._loc @@ -1132,7 +1143,7 @@ class Cursor(Structure): pointed at by the cursor. """ if not hasattr(self, '_extent'): - self._extent = lib.clang_getCursorExtent(self) + self._extent = conf.lib.clang_getCursorExtent(self) return self._extent @@ -1142,7 +1153,7 @@ class Cursor(Structure): Retrieve the Type (if any) of the entity pointed at by the cursor. """ if not hasattr(self, '_type'): - self._type = lib.clang_getCursorType(self) + self._type = conf.lib.clang_getCursorType(self) return self._type @@ -1156,7 +1167,7 @@ class Cursor(Structure): declarations will be identical. """ if not hasattr(self, '_canonical'): - self._canonical = lib.clang_getCanonicalCursor(self) + self._canonical = conf.lib.clang_getCanonicalCursor(self) return self._canonical @@ -1164,7 +1175,7 @@ class Cursor(Structure): def result_type(self): """Retrieve the Type of the result for this Cursor.""" if not hasattr(self, '_result_type'): - self._result_type = lib.clang_getResultType(self.type) + self._result_type = conf.lib.clang_getResultType(self.type) return self._result_type @@ -1177,7 +1188,8 @@ class Cursor(Structure): """ if not hasattr(self, '_underlying_type'): assert self.kind.is_declaration() - self._underlying_type = lib.clang_getTypedefDeclUnderlyingType(self) + self._underlying_type = \ + conf.lib.clang_getTypedefDeclUnderlyingType(self) return self._underlying_type @@ -1190,7 +1202,7 @@ class Cursor(Structure): """ if not hasattr(self, '_enum_type'): assert self.kind == CursorKind.ENUM_DECL - self._enum_type = lib.clang_getEnumDeclIntegerType(self) + self._enum_type = conf.lib.clang_getEnumDeclIntegerType(self) return self._enum_type @@ -1213,16 +1225,18 @@ class Cursor(Structure): TypeKind.ULONG, TypeKind.ULONGLONG, TypeKind.UINT128): - self._enum_value = lib.clang_getEnumConstantDeclUnsignedValue(self) + self._enum_value = \ + conf.lib.clang_getEnumConstantDeclUnsignedValue(self) else: - self._enum_value = lib.clang_getEnumConstantDeclValue(self) + self._enum_value = conf.lib.clang_getEnumConstantDeclValue(self) return self._enum_value @property def objc_type_encoding(self): """Return the Objective-C type encoding as a str.""" if not hasattr(self, '_objc_type_encoding'): - self._objc_type_encoding = lib.clang_getDeclObjCTypeEncoding(self) + self._objc_type_encoding = \ + conf.lib.clang_getDeclObjCTypeEncoding(self) return self._objc_type_encoding @@ -1230,7 +1244,7 @@ class Cursor(Structure): def hash(self): """Returns a hash of the cursor as an int.""" if not hasattr(self, '_hash'): - self._hash = lib.clang_hashCursor(self) + self._hash = conf.lib.clang_hashCursor(self) return self._hash @@ -1238,7 +1252,7 @@ class Cursor(Structure): def semantic_parent(self): """Return the semantic parent for this cursor.""" if not hasattr(self, '_semantic_parent'): - self._semantic_parent = lib.clang_getCursorSemanticParent(self) + self._semantic_parent = conf.lib.clang_getCursorSemanticParent(self) return self._semantic_parent @@ -1246,7 +1260,7 @@ class Cursor(Structure): def lexical_parent(self): """Return the lexical parent for this cursor.""" if not hasattr(self, '_lexical_parent'): - self._lexical_parent = lib.clang_getCursorLexicalParent(self) + self._lexical_parent = conf.lib.clang_getCursorLexicalParent(self) return self._lexical_parent @@ -1257,6 +1271,12 @@ class Cursor(Structure): # created. return self._tu + def get_arguments(self): + """Return an iterator for accessing the arguments of this cursor.""" + num_args = conf.lib.clang_Cursor_getNumArguments(self) + for i in range(0, num_args): + yield conf.lib.clang_Cursor_getArgument(self, i) + def get_children(self): """Return an iterator for accessing the children of this cursor.""" @@ -1264,14 +1284,14 @@ class Cursor(Structure): def visitor(child, parent, children): # FIXME: Document this assertion in API. # FIXME: There should just be an isNull method. - assert child != lib.clang_getNullCursor() + assert child != conf.lib.clang_getNullCursor() # Create reference to TU so it isn't GC'd before Cursor. child._tu = self._tu children.append(child) return 1 # continue children = [] - lib.clang_visitChildren(self, callbacks['cursor_visit'](visitor), + conf.lib.clang_visitChildren(self, callbacks['cursor_visit'](visitor), children) return iter(children) @@ -1287,7 +1307,7 @@ class Cursor(Structure): def from_result(res, fn, args): assert isinstance(res, Cursor) # FIXME: There should just be an isNull method. - if res == lib.clang_getNullCursor(): + if res == conf.lib.clang_getNullCursor(): return None # Store a reference to the TU in the Python object so it won't get GC'd @@ -1310,7 +1330,7 @@ class Cursor(Structure): @staticmethod def from_cursor_result(res, fn, args): assert isinstance(res, Cursor) - if res == lib.clang_getNullCursor(): + if res == conf.lib.clang_getNullCursor(): return None res._tu = args[0]._tu @@ -1352,7 +1372,7 @@ class TypeKind(object): @property def spelling(self): """Retrieve the spelling of this TypeKind.""" - return lib.clang_getTypeKindSpelling(self.value) + return conf.lib.clang_getTypeKindSpelling(self.value) @staticmethod def from_id(id): @@ -1432,7 +1452,7 @@ class Type(Structure): def __len__(self): if self.length is None: - self.length = lib.clang_getNumArgTypes(self.parent) + self.length = conf.lib.clang_getNumArgTypes(self.parent) return self.length @@ -1448,7 +1468,7 @@ class Type(Structure): raise IndexError("Index greater than container length: " "%d > %d" % ( key, len(self) )) - result = lib.clang_getArgType(self.parent, key) + result = conf.lib.clang_getArgType(self.parent, key) if result.kind == TypeKind.INVALID: raise IndexError("Argument could not be retrieved.") @@ -1464,7 +1484,7 @@ class Type(Structure): If accessed on a type that is not an array, complex, or vector type, an exception will be raised. """ - result = lib.clang_getElementType(self) + result = conf.lib.clang_getElementType(self) if result.kind == TypeKind.INVALID: raise Exception('Element type not available on this type.') @@ -1478,7 +1498,7 @@ class Type(Structure): If the Type is not an array or vector, this raises. """ - result = lib.clang_getNumElements(self) + result = conf.lib.clang_getNumElements(self) if result < 0: raise Exception('Type does not have elements.') @@ -1516,7 +1536,7 @@ class Type(Structure): example, if 'T' is a typedef for 'int', the canonical type for 'T' would be 'int'. """ - return lib.clang_getCanonicalType(self) + return conf.lib.clang_getCanonicalType(self) def is_const_qualified(self): """Determine whether a Type has the "const" qualifier set. @@ -1524,7 +1544,7 @@ class Type(Structure): This does not look through typedefs that may have added "const" at a different level. """ - return lib.clang_isConstQualifiedType(self) + return conf.lib.clang_isConstQualifiedType(self) def is_volatile_qualified(self): """Determine whether a Type has the "volatile" qualifier set. @@ -1532,7 +1552,7 @@ class Type(Structure): This does not look through typedefs that may have added "volatile" at a different level. """ - return lib.clang_isVolatileQualifiedType(self) + return conf.lib.clang_isVolatileQualifiedType(self) def is_restrict_qualified(self): """Determine whether a Type has the "restrict" qualifier set. @@ -1540,53 +1560,53 @@ class Type(Structure): This does not look through typedefs that may have added "restrict" at a different level. """ - return lib.clang_isRestrictQualifiedType(self) + return conf.lib.clang_isRestrictQualifiedType(self) def is_function_variadic(self): """Determine whether this function Type is a variadic function type.""" assert self.kind == TypeKind.FUNCTIONPROTO - return lib.clang_isFunctionTypeVariadic(self) + return conf.lib.clang_isFunctionTypeVariadic(self) def is_pod(self): """Determine whether this Type represents plain old data (POD).""" - return lib.clang_isPODType(self) + return conf.lib.clang_isPODType(self) def get_pointee(self): """ For pointer types, returns the type of the pointee. """ - return lib.clang_getPointeeType(self) + return conf.lib.clang_getPointeeType(self) def get_declaration(self): """ Return the cursor for the declaration of the given type. """ - return lib.clang_getTypeDeclaration(self) + return conf.lib.clang_getTypeDeclaration(self) def get_result(self): """ Retrieve the result type associated with a function type. """ - return lib.clang_getResultType(self) + return conf.lib.clang_getResultType(self) def get_array_element_type(self): """ Retrieve the type of the elements of the array type. """ - return lib.clang_getArrayElementType(self) + return conf.lib.clang_getArrayElementType(self) def get_array_size(self): """ Retrieve the size of the constant array. """ - return lib.clang_getArraySize(self) + return conf.lib.clang_getArraySize(self) def __eq__(self, other): if type(other) != type(self): return False - return lib.clang_equalTypes(self, other) + return conf.lib.clang_equalTypes(self, other) def __ne__(self, other): return n |