(decl, attr, force=0)
| 1891 | |
| 1892 | |
| 1893 | def setattrspec(decl, attr, force=0): |
| 1894 | if not decl: |
| 1895 | decl = {} |
| 1896 | if not attr: |
| 1897 | return decl |
| 1898 | if 'attrspec' not in decl: |
| 1899 | decl['attrspec'] = [attr] |
| 1900 | return decl |
| 1901 | if force: |
| 1902 | decl['attrspec'].append(attr) |
| 1903 | if attr in decl['attrspec']: |
| 1904 | return decl |
| 1905 | if attr == 'static' and 'automatic' not in decl['attrspec']: |
| 1906 | decl['attrspec'].append(attr) |
| 1907 | elif attr == 'automatic' and 'static' not in decl['attrspec']: |
| 1908 | decl['attrspec'].append(attr) |
| 1909 | elif attr == 'public': |
| 1910 | if 'private' not in decl['attrspec']: |
| 1911 | decl['attrspec'].append(attr) |
| 1912 | elif attr == 'private': |
| 1913 | if 'public' not in decl['attrspec']: |
| 1914 | decl['attrspec'].append(attr) |
| 1915 | else: |
| 1916 | decl['attrspec'].append(attr) |
| 1917 | return decl |
| 1918 | |
| 1919 | |
| 1920 | def setkindselector(decl, sel, force=0): |
no outgoing calls
no test coverage detected
searching dependent graphs…