From 709b3128f3c3e9a0a52d79cc82a0cb9feb195dc1 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 17 Mar 2009 10:43:04 +0100 Subject: [PATCH] python: Fix build after refcount rework. --- src/gallium/state_trackers/python/p_texture.i | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/python/p_texture.i b/src/gallium/state_trackers/python/p_texture.i index 9396522961e..1e64fc8e41f 100644 --- a/src/gallium/state_trackers/python/p_texture.i +++ b/src/gallium/state_trackers/python/p_texture.i @@ -225,7 +225,7 @@ struct st_buffer { unsigned __len__(void) { - assert($self->buffer->refcount); + assert(p_atomic_read(&$self->buffer->reference.count) > 0); return $self->buffer->size; } @@ -235,7 +235,7 @@ struct st_buffer { struct pipe_screen *screen = $self->st_dev->screen; const char *map; - assert($self->buffer->refcount); + assert(p_atomic_read(&$self->buffer->reference.count) > 0); *LENGTH = $self->buffer->size; *STRING = (char *) malloc($self->buffer->size); @@ -255,7 +255,7 @@ struct st_buffer { struct pipe_screen *screen = $self->st_dev->screen; char *map; - assert($self->buffer->refcount); + assert(p_atomic_read(&$self->buffer->reference.count) > 0); if(offset > $self->buffer->size) { PyErr_SetString(PyExc_ValueError, "offset must be smaller than buffer size"); -- 2.30.2