Author: Armin Rigo <[email protected]>
Branch:
Changeset: r90664:b594a6c265f8
Date: 2017-03-13 17:55 +0100
http://bitbucket.org/pypy/pypy/changeset/b594a6c265f8/
Log: missing return values
diff --git a/pypy/module/cpyext/src/pymem.c b/pypy/module/cpyext/src/pymem.c
--- a/pypy/module/cpyext/src/pymem.c
+++ b/pypy/module/cpyext/src/pymem.c
@@ -45,10 +45,21 @@
_PyPyGC_AddMemoryPressure(report);
PyGILState_Release(state);
}
+
+ /* Should we return -2 or 0? In theory it should be -2, because
+ we're not using the info to really track the allocations.
+ But I'm sure someone is too clever somewhere and stops calling
+ _PyTraceMalloc_Track() if it returns -2. On the other hand,
+ returning 0 might lead to expectations that importing
+ 'tracemalloc' works on Python 3. Oh well, in that case we'll
+ just crash with ImportError during 'import tracemalloc'.
+ */
+ return 0;
}
int _PyTraceMalloc_Untrack(_PyTraceMalloc_domain_t domain,
uintptr_t ptr)
{
- /* nothing */
+ /* nothing to do */
+ return 0;
}
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit