(decl, attr, force=0)
| 1918 | |
| 1919 | |
| 1920 | def setattrspec(decl, attr, force=0): |
| 1921 | if not decl: |
| 1922 | decl = {} |
| 1923 | if not attr: |
| 1924 | return decl |
| 1925 | if 'attrspec' not in decl: |
| 1926 | decl['attrspec'] = [attr] |
| 1927 | return decl |
| 1928 | if force: |
| 1929 | decl['attrspec'].append(attr) |
| 1930 | if attr in decl['attrspec']: |
| 1931 | return decl |
| 1932 | if attr == 'static' and 'automatic' not in decl['attrspec']: |
| 1933 | decl['attrspec'].append(attr) |
| 1934 | elif attr == 'automatic' and 'static' not in decl['attrspec']: |
| 1935 | decl['attrspec'].append(attr) |
| 1936 | elif attr == 'public': |
| 1937 | if 'private' not in decl['attrspec']: |
| 1938 | decl['attrspec'].append(attr) |
| 1939 | elif attr == 'private': |
| 1940 | if 'public' not in decl['attrspec']: |
| 1941 | decl['attrspec'].append(attr) |
| 1942 | else: |
| 1943 | decl['attrspec'].append(attr) |
| 1944 | return decl |
| 1945 | |
| 1946 | |
| 1947 | def setkindselector(decl, sel, force=0): |
no outgoing calls
no test coverage detected