Skip to content

Commit 13b57a3

Browse files
committed
Rename pyNoMemoryError errPyNoMemory to conform to Go naming convention.
1 parent dbc3929 commit 13b57a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

p/pyerror.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ func getPyErr() error {
104104
if isPyNoMemoryError() {
105105
// Fetching stacktrace requires some memory,
106106
// so just return an error without stacktrace.
107-
return pyNoMemoryError
107+
return errPyNoMemory
108108
}
109109

110110
// TODO: consider to reserve excInfo
111111
excInfo := Object{p: C.PyTuple_New(3)}
112112
if excInfo.p == nil {
113113
if isPyNoMemoryError() {
114-
return pyNoMemoryError
114+
return errPyNoMemory
115115
}
116116
return getPyErr()
117117
}
@@ -168,6 +168,6 @@ func isPyNoMemoryError() bool {
168168
return C.PyErr_ExceptionMatches(C.PyExc_MemoryError) != 0
169169
}
170170

171-
// pyNoMemoryError is an error value representing an allocation error on Python.
171+
// errPyNoMemory is an error value representing an allocation error on Python.
172172
// This is not a pyErr because it is difficult to extract stacktrace from Python when the heap is exhaused.
173-
var pyNoMemoryError = errors.New("python interpreter failed to allocate memory")
173+
var errPyNoMemory = errors.New("python interpreter failed to allocate memory")

0 commit comments

Comments
 (0)