Commit a0471f34 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Improvements to the refcount checker

I thought I was getting close so I spent a few days on this.
But there's still a lot of work left to be done to get it to be usable.
parent ea7fe5c2
...@@ -922,7 +922,7 @@ watch_%: ...@@ -922,7 +922,7 @@ watch_%:
TARGET=$(dir $@)$(patsubst watch_%,%,$(notdir $@)); \ TARGET=$(dir $@)$(patsubst watch_%,%,$(notdir $@)); \
clear; $(MAKE) $$TARGET $(WATCH_ARGS); true; \ clear; $(MAKE) $$TARGET $(WATCH_ARGS); true; \
while inotifywait -q -e modify -e attrib -e move -e move_self -e create -e delete -e delete_self \ while inotifywait -q -e modify -e attrib -e move -e move_self -e create -e delete -e delete_self \
Makefile $$(find src test \( -name '*.cpp' -o -name '*.h' -o -name '*.py' \) ); do clear; \ Makefile $$(find src test plugins \( -name '*.cpp' -o -name '*.h' -o -name '*.py' \) ); do clear; \
$(MAKE) $$TARGET $(WATCH_ARGS); \ $(MAKE) $$TARGET $(WATCH_ARGS); \
done ) done )
# Makefile $$(find \( -name '*.cpp' -o -name '*.h' -o -name '*.py' \) -o -type d ); do clear; $(MAKE) $(patsubst watch_%,%,$@); done ) # Makefile $$(find \( -name '*.cpp' -o -name '*.h' -o -name '*.py' \) -o -type d ); do clear; $(MAKE) $(patsubst watch_%,%,$@); done )
...@@ -1089,7 +1089,7 @@ refcheck_%: %.cpp refcount_checker ...@@ -1089,7 +1089,7 @@ refcheck_%: %.cpp refcount_checker
cd $(CMAKE_DIR_DBG); $(REFCOUNT_CHECKER_RUN_PATH) ../../$< cd $(CMAKE_DIR_DBG); $(REFCOUNT_CHECKER_RUN_PATH) ../../$<
.PHONY: dbg_refcheck_% .PHONY: dbg_refcheck_%
dbg_refcheck_%: %.cpp refcount_checker dbg_refcheck_%: %.cpp refcount_checker
cd $(CMAKE_DIR_DBG); $(GDB) --args $(REFCOUNT_CHECKER_RUN_PATH) ../../$< cd $(CMAKE_DIR_DBG); $(GDB) --ex run --ex "bt 20" --args $(REFCOUNT_CHECKER_RUN_PATH) ../../$<
.PHONY: clang_lint .PHONY: clang_lint
......
...@@ -90,7 +90,7 @@ typedef struct { ...@@ -90,7 +90,7 @@ typedef struct {
PyAPI_FUNC(void) PyErr_SetNone(PyObject *) PYSTON_NOEXCEPT; PyAPI_FUNC(void) PyErr_SetNone(PyObject *) PYSTON_NOEXCEPT;
PyAPI_FUNC(void) PyErr_SetObject(PyObject *, PyObject *) PYSTON_NOEXCEPT; PyAPI_FUNC(void) PyErr_SetObject(PyObject *, PyObject *) PYSTON_NOEXCEPT;
PyAPI_FUNC(void) PyErr_SetString(PyObject *, const char *) PYSTON_NOEXCEPT; PyAPI_FUNC(void) PyErr_SetString(PyObject *, const char *) PYSTON_NOEXCEPT;
PyAPI_FUNC(PyObject *) PyErr_Occurred(void) PYSTON_NOEXCEPT; PyAPI_FUNC(BORROWED(PyObject *)) PyErr_Occurred(void) PYSTON_NOEXCEPT;
PyAPI_FUNC(void) PyErr_Clear(void) PYSTON_NOEXCEPT; PyAPI_FUNC(void) PyErr_Clear(void) PYSTON_NOEXCEPT;
PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **) PYSTON_NOEXCEPT; PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **) PYSTON_NOEXCEPT;
PyAPI_FUNC(void) PyErr_Restore(STOLEN(PyObject *), STOLEN(PyObject *), STOLEN(PyObject *)) PYSTON_NOEXCEPT; PyAPI_FUNC(void) PyErr_Restore(STOLEN(PyObject *), STOLEN(PyObject *), STOLEN(PyObject *)) PYSTON_NOEXCEPT;
...@@ -219,7 +219,8 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename( ...@@ -219,7 +219,8 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename(
PyObject *, const Py_UNICODE *) PYSTON_NOEXCEPT; PyObject *, const Py_UNICODE *) PYSTON_NOEXCEPT;
#endif /* MS_WINDOWS */ #endif /* MS_WINDOWS */
PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...) // This actually always returns NULL:
PyAPI_FUNC(BORROWED(PyObject *)) PyErr_Format(PyObject *, const char *, ...)
PYSTON_NOEXCEPT Py_GCC_ATTRIBUTE((format(printf, 2, 3))); PYSTON_NOEXCEPT Py_GCC_ATTRIBUTE((format(printf, 2, 3)));
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
......
...@@ -65,9 +65,9 @@ VUP = Vector(0,1,0) ...@@ -65,9 +65,9 @@ VUP = Vector(0,1,0)
VOUT = Vector(0,0,1) VOUT = Vector(0,0,1)
if not (VRIGHT.reflectThrough(VUP) == VRIGHT): if not (VRIGHT.reflectThrough(VUP) == VRIGHT):
print 1/0 print(1/0)
if not (Vector(-1,-1,0).reflectThrough(VUP) == Vector(-1,1,0)): if not (Vector(-1,-1,0).reflectThrough(VUP) == Vector(-1,1,0)):
print 1/0 print(1/0)
class Point(object): class Point(object):
def __init__(self, initx, inity, initz): def __init__(self, initx, inity, initz):
...@@ -216,7 +216,7 @@ class Scene(object): ...@@ -216,7 +216,7 @@ class Scene(object):
for y in range(canvas.height): for y in range(canvas.height):
currentfraction = 1.0 * y / canvas.height currentfraction = 1.0 * y / canvas.height
if currentfraction - previousfraction > 0.05: if currentfraction - previousfraction > 0.05:
print '%d%% complete' % int(currentfraction * 100) print('%d%% complete' % int(currentfraction * 100))
previousfraction = currentfraction previousfraction = currentfraction
for x in range(canvas.width): for x in range(canvas.width):
xcomp = vpRight.scale(x * pixelWidth - halfWidth) xcomp = vpRight.scale(x * pixelWidth - halfWidth)
...@@ -225,7 +225,7 @@ class Scene(object): ...@@ -225,7 +225,7 @@ class Scene(object):
colour = self.rayColour(ray) colour = self.rayColour(ray)
canvas.plot(x,y,colour[0], colour[1], colour[2]) canvas.plot(x,y,colour[0], colour[1], colour[2])
print 'Complete.' print('Complete.')
# canvas.save() # canvas.save()
def rayColour(self, ray): def rayColour(self, ray):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment