isPyCompatVar checks if var is compatible with python
(v *symbol)
| 97 | |
| 98 | // isPyCompatVar checks if var is compatible with python |
| 99 | func isPyCompatVar(v *symbol) error { |
| 100 | if v == nil { |
| 101 | return fmt.Errorf("gopy: var symbol not found") |
| 102 | } |
| 103 | if v.isPointer() && v.isBasic() { |
| 104 | return fmt.Errorf("gopy: var is pointer to basic type") |
| 105 | } |
| 106 | if isErrorType(v.gotyp) { |
| 107 | return fmt.Errorf("gopy: var is error type") |
| 108 | } |
| 109 | if _, isChan := v.gotyp.(*types.Chan); isChan { |
| 110 | return fmt.Errorf("gopy: var is channel type") |
| 111 | } |
| 112 | return nil |
| 113 | } |
| 114 | |
| 115 | // isPyCompatType checks if type is compatible with python |
| 116 | func isPyCompatType(typ types.Type) error { |
no test coverage detected