python: Fix build after refcount rework.
authorMichal Krol <michal@vmware.com>
Tue, 17 Mar 2009 09:43:04 +0000 (10:43 +0100)
committerMichal Krol <michal@vmware.com>
Tue, 17 Mar 2009 09:43:04 +0000 (10:43 +0100)
src/gallium/state_trackers/python/p_texture.i

index 9396522961e62669c7a9979e57f888f35d518061..1e64fc8e41fd997b43e67bb48be8de5054d0ca5d 100644 (file)
@@ -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");