From: Michal Krol Date: Tue, 17 Mar 2009 09:43:04 +0000 (+0100) Subject: python: Fix build after refcount rework. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=709b3128f3c3e9a0a52d79cc82a0cb9feb195dc1;p=mesa.git python: Fix build after refcount rework. --- 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");