Make the sprite map globally accessible from C code as well as python code

The lock was removed as the Python GIL is sufficient to serialize access
to the SpriteMap structure.
This commit is contained in:
Kovid Goyal
2017-09-15 10:45:10 +05:30
parent 4feff2e2da
commit 6127d2d122
12 changed files with 191 additions and 203 deletions
+2 -2
View File
@@ -97,13 +97,13 @@ update_cell_range(ChangeTracker *self, PyObject *args) {
Py_RETURN_NONE;
}
bool tracker_update_cell_data(ScreenModes *modes, ChangeTracker *self, LineBuf *lb, SpriteMap *spm, unsigned int *data, bool force_screen_refresh) {
bool tracker_update_cell_data(ScreenModes *modes, ChangeTracker *self, LineBuf *lb, unsigned int *data, bool force_screen_refresh) {
unsigned int y;
Py_ssize_t start;
#define UPDATE_RANGE(xstart, xmax) \
linebuf_init_line(lb, y); \
if (!update_cell_range_data(modes, spm, lb->line, (xstart), (xmax), data)) return false;
if (!update_cell_range_data(modes, lb->line, (xstart), (xmax), data)) return false;
if (self->screen_changed || force_screen_refresh) {
for (y = 0; y < self->ynum; y++) {