mirror of
https://github.com/mesonbuild/meson.git
synced 2026-08-13 17:07:04 +00:00
Fix invalid Python overrides
- mismatched method type - mismatched parameter names
This commit is contained in:
committed by
Eli Schwartz
parent
8d918e0147
commit
5d0538d235
@@ -53,9 +53,7 @@ else:
|
||||
|
||||
|
||||
class CCompiler(CLikeCompiler, Compiler):
|
||||
|
||||
@staticmethod
|
||||
def attribute_check_func(name: str) -> str:
|
||||
def attribute_check_func(self, name: str) -> str:
|
||||
try:
|
||||
return C_FUNC_ATTRIBUTES[name]
|
||||
except KeyError:
|
||||
|
||||
@@ -60,9 +60,7 @@ def non_msvc_eh_options(eh: str, args: T.List[str]) -> None:
|
||||
'You may want to set eh to \'default\'.')
|
||||
|
||||
class CPPCompiler(CLikeCompiler, Compiler):
|
||||
|
||||
@classmethod
|
||||
def attribute_check_func(cls, name: str) -> str:
|
||||
def attribute_check_func(self, name: str) -> str:
|
||||
try:
|
||||
return CXX_FUNC_ATTRIBUTES.get(name, C_FUNC_ATTRIBUTES[name])
|
||||
except KeyError:
|
||||
|
||||
@@ -187,8 +187,8 @@ class CLikeCompiler(Compiler):
|
||||
def get_no_optimization_args(self) -> T.List[str]:
|
||||
return ['-O0']
|
||||
|
||||
def get_output_args(self, target: str) -> T.List[str]:
|
||||
return ['-o', target]
|
||||
def get_output_args(self, outputname: str) -> T.List[str]:
|
||||
return ['-o', outputname]
|
||||
|
||||
def get_werror_args(self) -> T.List[str]:
|
||||
return ['-Werror']
|
||||
@@ -270,8 +270,8 @@ class CLikeCompiler(Compiler):
|
||||
def get_pch_use_args(self, pch_dir: str, header: str) -> T.List[str]:
|
||||
return ['-include', os.path.basename(header)]
|
||||
|
||||
def get_pch_name(self, header_name: str) -> str:
|
||||
return os.path.basename(header_name) + '.' + self.get_pch_suffix()
|
||||
def get_pch_name(self, name: str) -> str:
|
||||
return os.path.basename(name) + '.' + self.get_pch_suffix()
|
||||
|
||||
def get_default_include_dirs(self) -> T.List[str]:
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user