File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change
1
+ * .pyc
Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ type PyObject struct {
15
15
ptr * C.PyObject
16
16
}
17
17
18
+ // String returns a string representation of the PyObject
19
+ func (self * PyObject ) String () string {
20
+ o := self .Str ()
21
+ defer o .DecRef ()
22
+ return PyString_AsString (o )
23
+ }
24
+
18
25
func (self * PyObject ) topy () * C.PyObject {
19
26
return self .ptr
20
27
}
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ func TestErrFetch(t *testing.T) {
112
112
t .Parallel ()
113
113
testPkg (t , pkg {
114
114
path : "tests/errfetch" ,
115
- want : []byte ("exc=&{<nil>} \n val=&{<nil>} \n tb=&{<nil>} \n " ),
115
+ want : []byte ("exc=<NULL> \n val=<NULL> \n tb=<NULL> \n " ),
116
116
})
117
117
}
118
118
You can’t perform that action at this time.
0 commit comments