Author: ArcRiley Date: 2008-05-18 13:14:51 -0400 (Sun, 18 May 2008) New Revision: 1265
Modified: trunk/pysoy/include/gl.pxd trunk/pysoy/include/glib.pxd trunk/pysoy/include/ode.pxd trunk/pysoy/include/ogg.pxd trunk/pysoy/include/posix.pxd trunk/pysoy/include/soy._datatypes.pxd trunk/pysoy/include/soy._internals.pxd trunk/pysoy/include/soy.fields.pxd trunk/pysoy/include/soy.textures.pxd trunk/pysoy/include/soy.transports.pxd trunk/pysoy/include/stdio.pxd trunk/pysoy/include/windows.pxd trunk/pysoy/setup.py trunk/pysoy/src/_datatypes/VertexList.pym trunk/pysoy/src/_internals/AsyncQueue.pym trunk/pysoy/src/_internals/Children.pym trunk/pysoy/src/_internals/Loadable.pym trunk/pysoy/src/_internals/LoopThread.pym trunk/pysoy/src/_internals/Loopable.pym trunk/pysoy/src/_internals/PointerSet.pym trunk/pysoy/src/_internals/_sleep.pym trunk/pysoy/src/_internals/_time.pym trunk/pysoy/src/atoms/Vertex.pym trunk/pysoy/src/scenes/Scene.pym trunk/pysoy/src/textures/NormalisationCubeMap.pym trunk/pysoy/src/textures/Texture.pym trunk/pysoy/src/textures/Video.pym trunk/pysoy/src/transports/File.pym trunk/pysoy/src/transports/Transport.pym Log: '''Pyrex 0.9.8.2 fixes''' : * now requires 0.9.8.2 * nogil goes everywhere * a few functions got GIL-cleaned * still doesn't compile, but many steps closer Modified: trunk/pysoy/include/gl.pxd =================================================================== --- trunk/pysoy/include/gl.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/gl.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -17,7 +17,7 @@ # # $Id$ -cdef extern from "GL/glew.h" : +cdef extern from "GL/glew.h" nogil : ctypedef enum : # Boolean Values GL_FALSE Modified: trunk/pysoy/include/glib.pxd =================================================================== --- trunk/pysoy/include/glib.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/glib.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -18,7 +18,7 @@ # $Id$ -cdef extern from "glib.h" : +cdef extern from "glib.h" nogil : ctypedef void* gpointer ctypedef void* gconstpointer ctypedef char gchar Modified: trunk/pysoy/include/ode.pxd =================================================================== --- trunk/pysoy/include/ode.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/ode.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -17,7 +17,7 @@ # # $Id$ -cdef extern from "ode/ode.h" : +cdef extern from "ode/ode.h" nogil : ctypedef enum : #common dEpsilon Modified: trunk/pysoy/include/ogg.pxd =================================================================== --- trunk/pysoy/include/ogg.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/ogg.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -17,7 +17,7 @@ # # $Id$ -cdef extern from "ogg/ogg.h" : +cdef extern from "ogg/ogg.h" nogil : ctypedef short ogg_int16_t ctypedef unsigned short ogg_uint16_t ctypedef int ogg_int32_t @@ -146,7 +146,7 @@ cdef void ogg_packet_clear ( ogg_packet* ) -cdef extern from "vorbis/codec.h" : +cdef extern from "vorbis/codec.h" nogil : ctypedef enum : OV_FALSE OV_EOF @@ -267,7 +267,7 @@ cdef int vorbis_synthesis_halfrate_p( vorbis_info *v ) -cdef extern from "theora/theora.h" : +cdef extern from "theora/theora.h" nogil : ctypedef enum : OC_FAULT OC_EINVAL Modified: trunk/pysoy/include/posix.pxd =================================================================== --- trunk/pysoy/include/posix.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/posix.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -17,11 +17,11 @@ # # $Id$ -cdef extern from "sys/time.h" : +cdef extern from "sys/time.h" nogil : cdef struct timeval : long int tv_sec long int tv_usec int gettimeofday (timeval *tv, void *tz ) -cdef extern from "unistd.h" : +cdef extern from "unistd.h" nogil : void usleep(unsigned long usec) Modified: trunk/pysoy/include/soy._datatypes.pxd =================================================================== --- trunk/pysoy/include/soy._datatypes.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/soy._datatypes.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -57,9 +57,9 @@ float tx float ty float tz - float tan_x - float tan_y - float tan_z + float ux + float uy + float uz struct Range : int offset Modified: trunk/pysoy/include/soy._internals.pxd =================================================================== --- trunk/pysoy/include/soy._internals.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/soy._internals.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -21,7 +21,7 @@ cdef class AsyncQueue : cdef glib.GAsyncQueue* _asyncqueue - cdef void _push ( self, void* ) + cdef void _push ( self, void* ) nogil cdef object _pop ( self ) @@ -36,33 +36,32 @@ cdef void* _lockMain cdef void* _lockIter # Internal C functions - cdef int _offset ( self, void* ) - cdef void _swap ( self, int, int ) + cdef int _offset ( self, void* ) nogil + cdef void _swap ( self, int, int ) nogil # External C functions - cdef void _append ( self, void* ) - cdef void _bottom ( self, void* ) - cdef void _empty ( self ) - cdef int _index ( self, void* ) - cdef void _iterDone ( self ) - cdef void _iterStart ( self ) - cdef void _lower ( self, void* ) - cdef void _raise ( self, void* ) - cdef void _remove ( self, void* ) - cdef void _top ( self, void* ) + cdef void _append ( self, void* ) nogil + cdef void _bottom ( self, void* ) nogil + cdef void _empty ( self ) nogil + cdef int _index ( self, void* ) nogil + cdef void _iterDone ( self ) nogil + cdef void _iterStart ( self ) nogil + cdef void _lower ( self, void* ) nogil + cdef void _raise ( self, void* ) nogil + cdef void _remove ( self, void* ) nogil + cdef void _top ( self, void* ) nogil cdef class Loadable : cdef object _source cdef int _state - cdef int _load ( self, void*, int ) - cdef int _save ( self, void*, int ) - cdef int _ready ( self ) + cdef int _load ( self, void*, int ) nogil + cdef int _save ( self, void*, int ) nogil + cdef int _ready ( self ) nogil cdef class Loopable : - cdef int _loop ( self ) + cdef int _loop ( self ) nogil - cdef class LoopThread : cdef long _threadID cdef int _size @@ -75,21 +74,21 @@ cdef object _name cdef object _active cdef object _active_limbo_lock - cdef void _loop ( self ) - cdef void _append ( self, void* ) - cdef void _remove ( self, void* ) + cdef void _loop ( self ) nogil + cdef void _append ( self, void* ) nogil + cdef void _remove ( self, void* ) nogil cdef class PointerSet : cdef glib.GHashTable* _hashtable - cdef void _insert ( self, void* ) - cdef int _has_key ( self, void* ) - cdef int _remove ( self, void* ) - cdef void _empty ( self ) - cdef void _foreach ( self, glib.GHFunc, void* ) + cdef void _insert ( self, void* ) nogil + cdef int _has_key ( self, void* ) nogil + cdef int _remove ( self, void* ) nogil + cdef void _empty ( self ) nogil + cdef void _foreach ( self, glib.GHFunc, void* ) nogil # Extension-level C functions -cdef void _sleep ( unsigned int ) -cdef double _time ( ) +cdef void _sleep ( unsigned int ) nogil +cdef double _time ( ) nogil cdef AsyncQueue _getQueue ( ) Modified: trunk/pysoy/include/soy.fields.pxd =================================================================== --- trunk/pysoy/include/soy.fields.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/soy.fields.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -22,11 +22,11 @@ cimport soy.bodies cdef class Field (soy.bodies.Body) : - cdef void _give(self, int ccyle) - cdef int _apply(self) - cdef int _exert(self, soy.bodies.Body other) - cdef void _commit(self) - cdef void _render(self) + cdef void _give ( self, int ) + cdef int _apply ( self ) + cdef int _exert ( self, soy.bodies.Body ) + cdef void _commit ( self ) + cdef void _render ( self ) nogil cdef class Monopole (Field) : cdef soy._internals.Children _affected Modified: trunk/pysoy/include/soy.textures.pxd =================================================================== --- trunk/pysoy/include/soy.textures.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/soy.textures.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -44,8 +44,8 @@ cdef int _types[3] cdef int _formats[5] # General C functions - cdef void _resize(self, int, int, int, int, int) - cdef int _squareup(self, int) + cdef void _resize(self, int, int, int, int, int) nogil + cdef int _squareup(self, int) nogil # WindowLoop functions cdef void _enable(self) cdef void _disable(self) Modified: trunk/pysoy/include/soy.transports.pxd =================================================================== --- trunk/pysoy/include/soy.transports.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/soy.transports.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -43,28 +43,29 @@ # # General Functions cdef int _initObjt ( self, int, object, object ) - cdef int _indexName ( self, char*, unsigned char ) - cdef int _indexSerial ( self, int ) + cdef int _indexName ( self, char*, + unsigned char ) nogil + cdef int _indexSerial ( self, int ) nogil # # Transport-specific functions cdef int _open ( self, object ) - cdef int _read ( self, char*, int ) - cdef int _write ( self, char*, int ) - cdef int _goto ( self, long ) - cdef int _seek ( self, long ) - cdef long _tell ( self ) - cdef void _rewind ( self ) - cdef void _close ( self ) + cdef int _read ( self, char*, int ) nogil + cdef int _write ( self, char*, int ) nogil + cdef int _goto ( self, long ) nogil + cdef int _seek ( self, long ) nogil + cdef long _tell ( self ) nogil + cdef void _rewind ( self ) nogil + cdef void _close ( self ) nogil # # Soy functions cdef void _soyHead ( self ) - cdef void _soyLoad ( self ) - cdef void _soyRead ( self, char*, int ) + cdef void _soyLoad ( self ) nogil + cdef void _soyRead ( self, char*, int ) nogil # # Ogg functions cdef void _oggHead ( self ) - cdef void _oggLoad ( self ) - cdef int _oggReadPage ( self, ogg.ogg_page* ) + cdef void _oggLoad ( self ) nogil + cdef int _oggReadPage ( self, ogg.ogg_page* ) nogil cdef class File (Transport) : Modified: trunk/pysoy/include/stdio.pxd =================================================================== --- trunk/pysoy/include/stdio.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/stdio.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -17,7 +17,7 @@ # # $Id$ -cdef extern from "stdio.h" : +cdef extern from "stdio.h" nogil : ctypedef enum : SEEK_SET SEEK_CUR @@ -31,5 +31,5 @@ long ftell ( void* ) void rewind ( void* ) -cdef extern from "signal.h" : +cdef extern from "signal.h" nogil : int c_raise "raise" ( int ) Modified: trunk/pysoy/include/windows.pxd =================================================================== --- trunk/pysoy/include/windows.pxd 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/include/windows.pxd 2008-05-18 17:14:51 UTC (rev 1265) @@ -17,7 +17,7 @@ # # $Id$ -cdef extern from "windows.h": +cdef extern from "windows.h" nogil : ctypedef void* HDC # handle to device context ctypedef void* HGLRC # handle to GL rendering context ctypedef void* HWND # handle to window Modified: trunk/pysoy/setup.py =================================================================== --- trunk/pysoy/setup.py 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/setup.py 2008-05-18 17:14:51 UTC (rev 1265) @@ -26,8 +26,8 @@ from distutils.extension import Extension from Pyrex.Compiler import Main -if Main.Version.version < '0.9.8' : - raise SystemError('Pyrex version 0.9.8 is required.') +if Main.Version.version < '0.9.8.2' : + raise SystemError('Pyrex version 0.9.8.2 or higher is required.') version = 'Trunk' modules = { Modified: trunk/pysoy/src/_datatypes/VertexList.pym =================================================================== --- trunk/pysoy/src/_datatypes/VertexList.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/_datatypes/VertexList.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -246,16 +246,16 @@ _vert_light_pos[1] = _vert_light_pos[1] / _lgt _vert_light_pos[2] = _vert_light_pos[2] / _lgt # - _binormal[0] = self._array[_i].tan_y * self._array[_i].nz - \ - self._array[_i].tan_z * self._array[_i].ny - _binormal[1] = self._array[_i].tan_z * self._array[_i].nx - \ - self._array[_i].tan_x * self._array[_i].nz - _binormal[2] = self._array[_i].tan_x * self._array[_i].ny - \ - self._array[_i].tan_y * self._array[_i].nx + _binormal[0] = self._array[_i].uy * self._array[_i].nz - \ + self._array[_i].uz * self._array[_i].ny + _binormal[1] = self._array[_i].uz * self._array[_i].nx - \ + self._array[_i].ux * self._array[_i].nz + _binormal[2] = self._array[_i].ux * self._array[_i].ny - \ + self._array[_i].uy * self._array[_i].nx # - self._tslvArray[3*_i+0] = ( _vert_light_pos[0] * self._array[_i].tan_x\ - +_vert_light_pos[1] * self._array[_i].tan_y\ - +_vert_light_pos[2] * self._array[_i].tan_z) + self._tslvArray[3*_i+0] = ( _vert_light_pos[0] * self._array[_i].ux\ + +_vert_light_pos[1] * self._array[_i].uy\ + +_vert_light_pos[2] * self._array[_i].uz) self._tslvArray[3*_i+1] = ( _vert_light_pos[0] * _binormal[0] \ +_vert_light_pos[1] * _binormal[1] \ +_vert_light_pos[2] * _binormal[2] ) Modified: trunk/pysoy/src/_internals/AsyncQueue.pym =================================================================== --- trunk/pysoy/src/_internals/AsyncQueue.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/_internals/AsyncQueue.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -42,7 +42,7 @@ # C functions # - cdef void _push(self, void* data) : + cdef void _push(self, void* data) nogil : glib.g_async_queue_push(self._asyncqueue, data) cdef object _pop(self) : Modified: trunk/pysoy/src/_internals/Children.pym =================================================================== --- trunk/pysoy/src/_internals/Children.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/_internals/Children.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -62,7 +62,7 @@ # Internal C functions # - cdef int _offset(self, void* _child) : + cdef int _offset(self, void* _child) nogil : cdef int _i for _i from 0 <= _i < self._current : if self._list[_i] == _child : @@ -70,7 +70,7 @@ return -1 - cdef void _swap(self, int _first, int _second) : + cdef void _swap(self, int _first, int _second) nogil : cdef void* _sibling _sibling = self._list[_first] self._list[_first] = self._list[_second] @@ -82,7 +82,7 @@ # External C functions # - cdef void _append(self, void* _child) : + cdef void _append(self, void* _child) nogil : py.PyThread_acquire_lock(self._lockMain, 1) # # Wait until all iterations are complete @@ -97,7 +97,7 @@ py.PyThread_release_lock(self._lockMain) - cdef void _top(self, void* _child) : + cdef void _top(self, void* _child) nogil : cdef int _offset py.PyThread_acquire_lock(self._lockMain, 1) # Wait until all iterations are complete @@ -113,7 +113,7 @@ py.PyThread_release_lock(self._lockMain) - cdef void _bottom(self, void* _child) : + cdef void _bottom(self, void* _child) nogil : cdef int _offset py.PyThread_acquire_lock(self._lockMain, 1) # Wait until all iterations are complete @@ -127,7 +127,7 @@ py.PyThread_release_lock(self._lockMain) - cdef void _empty(self) : + cdef void _empty(self) nogil : py.PyThread_acquire_lock(self._lockMain, 1) # Wait until all iterations are complete while self._iters != 0 : @@ -139,7 +139,7 @@ py.PyThread_release_lock(self._lockMain) - cdef int _index(self, void* _child) : + cdef int _index(self, void* _child) nogil : cdef int _i self._iterStart() _i = self._offset(_child) @@ -147,13 +147,13 @@ return _i - cdef void _iterDone(self) : + cdef void _iterDone(self) nogil : py.PyThread_acquire_lock(self._lockIter, 1) self._iters = self._iters - 1 py.PyThread_release_lock(self._lockIter) - cdef void _iterStart(self) : + cdef void _iterStart(self) nogil : py.PyThread_acquire_lock(self._lockMain, 1) py.PyThread_acquire_lock(self._lockIter, 1) self._iters = self._iters + 1 @@ -161,7 +161,7 @@ py.PyThread_release_lock(self._lockMain) - cdef void _lower(self, void* _child) : + cdef void _lower(self, void* _child) nogil : cdef int _offset py.PyThread_acquire_lock(self._lockMain, 1) # Wait until all iterations are complete @@ -173,7 +173,7 @@ py.PyThread_release_lock(self._lockMain) - cdef void _raise(self, void* _child) : + cdef void _raise(self, void* _child) nogil : cdef int _offset py.PyThread_acquire_lock(self._lockMain, 1) # Wait until all iterations are complete @@ -187,7 +187,7 @@ py.PyThread_release_lock(self._lockMain) - cdef void _remove(self, void* _child) : + cdef void _remove(self, void* _child) nogil : cdef int _i, _offset py.PyThread_acquire_lock(self._lockMain, 1) # Modified: trunk/pysoy/src/_internals/Loadable.pym =================================================================== --- trunk/pysoy/src/_internals/Loadable.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/_internals/Loadable.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -38,11 +38,11 @@ # C functions # - cdef int _load(self, void* _data, int _size) : + cdef int _load(self, void* _data, int _size) nogil : return 0 - cdef int _save(self, void* _data, int _size) : + cdef int _save(self, void* _data, int _size) nogil : return 0 - cdef int _ready(self) : + cdef int _ready(self) nogil : return 0 Modified: trunk/pysoy/src/_internals/LoopThread.pym =================================================================== --- trunk/pysoy/src/_internals/LoopThread.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/_internals/LoopThread.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -83,7 +83,7 @@ # C functions # - cdef void _loop(self) : + cdef void _loop(self) nogil : cdef int _i, _t, _most # py.PyThread_acquire_lock(self._loopLock, 1) @@ -103,7 +103,8 @@ py.PyThread_release_lock(self._loopLock) stdio.printf('Finished C\n') - cdef void _append(self, void* _child) : + + cdef void _append(self, void* _child) nogil : py.PyThread_acquire_lock(self._listLock, 1) if self._size == self._current : self._size = self._size * 2 @@ -113,7 +114,8 @@ self._wake = 1 py.PyThread_release_lock(self._listLock) - cdef void _remove(self, void* _child) : + + cdef void _remove(self, void* _child) nogil : cdef int _i, _j py.PyThread_acquire_lock(self._listLock, 1) for _i from 0 <= _i < self._current : Modified: trunk/pysoy/src/_internals/Loopable.pym =================================================================== --- trunk/pysoy/src/_internals/Loopable.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/_internals/Loopable.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -28,5 +28,5 @@ # C functions # - cdef int _loop(self) : + cdef int _loop(self) nogil : return 1000 Modified: trunk/pysoy/src/_internals/PointerSet.pym =================================================================== --- trunk/pysoy/src/_internals/PointerSet.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/_internals/PointerSet.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -39,18 +39,18 @@ # C functions # - cdef void _insert(self, void* key) : + cdef void _insert(self, void* key) nogil : glib.g_hash_table_insert(self._hashtable, key, NULL) - cdef int _has_key(self, void* key) : + cdef int _has_key(self, void* key) nogil : cdef glib.gpointer k, d return glib.g_hash_table_lookup_extended(self._hashtable, key, &k, &d) - cdef int _remove(self, void* key) : + cdef int _remove(self, void* key) nogil : return glib.g_hash_table_remove(self._hashtable, key) - cdef void _empty(self) : + cdef void _empty(self) nogil : glib.g_hash_table_remove_all(self._hashtable) - cdef void _foreach(self, glib.GHFunc function, void* user_data) : + cdef void _foreach(self, glib.GHFunc function, void* user_data) nogil : glib.g_hash_table_foreach(self._hashtable, function, user_data) Modified: trunk/pysoy/src/_internals/_sleep.pym =================================================================== --- trunk/pysoy/src/_internals/_sleep.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/_internals/_sleep.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -17,7 +17,7 @@ # # $Id$ -cdef void _sleep( unsigned int mseconds ) : +cdef void _sleep( unsigned int mseconds ) nogil : # # Cross-platform sleep function # Modified: trunk/pysoy/src/_internals/_time.pym =================================================================== --- trunk/pysoy/src/_internals/_time.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/_internals/_time.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -17,7 +17,7 @@ # # $Id$ -cdef double _time( ) : +cdef double _time( ) nogil : # # Cross-platform time-of-day function # Modified: trunk/pysoy/src/atoms/Vertex.pym =================================================================== --- trunk/pysoy/src/atoms/Vertex.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/atoms/Vertex.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -160,9 +160,9 @@ def __get__(self) : cdef object t py.PyThread_acquire_lock(self._mutex, 1) - t = (self._list._array[self._index].tan_x, - self._list._array[self._index].tan_y, - self._list._array[self._index].tan_z) + t = (self._list._array[self._index].ux, + self._list._array[self._index].uy, + self._list._array[self._index].uz) py.PyThread_release_lock(self._mutex) return t @@ -173,8 +173,8 @@ raise TypeError('Must provide (x,y,z)') py.PyThread_acquire_lock(self._mutex, 1) - self._list._array[self._index].tan_x = value[0] - self._list._array[self._index].tan_y = value[1] - self._list._array[self._index].tan_z = value[2] + self._list._array[self._index].ux = value[0] + self._list._array[self._index].uy = value[1] + self._list._array[self._index].uz = value[2] self._list._flagUpdated(self._index) py.PyThread_release_lock(self._mutex) Modified: trunk/pysoy/src/scenes/Scene.pym =================================================================== --- trunk/pysoy/src/scenes/Scene.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/scenes/Scene.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -82,7 +82,7 @@ # C functions # - cdef int _loop(self) : + cdef int _loop(self) nogil : cdef int _i, _steps self._updateTime() self._callFields._empty() Modified: trunk/pysoy/src/textures/NormalisationCubeMap.pym =================================================================== --- trunk/pysoy/src/textures/NormalisationCubeMap.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/textures/NormalisationCubeMap.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -203,6 +203,8 @@ cdef void _enable(self): py.PyThread_acquire_lock(self._mutex,1) + if self._was_created == 0 : + self._generate(32,32) gl.glEnable(self._target) gl.glBindTexture(self._target, self._textureID) Modified: trunk/pysoy/src/textures/Texture.pym =================================================================== --- trunk/pysoy/src/textures/Texture.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/textures/Texture.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -114,7 +114,7 @@ # General C Functions # - cdef void _resize(self, int _b, int _c, int _x, int _y, int _z) : + cdef void _resize(self, int _b, int _c, int _x, int _y, int _z) nogil : # # This function is called to allocate or free self._texels # It will also set self._chans self._width self._height and self._depth @@ -158,7 +158,7 @@ self._depth = _z - cdef int _squareup(self, int _v) : + cdef int _squareup(self, int _v) nogil : # # This handy hack courtesy Sean Anderson, see: # http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 @@ -269,7 +269,7 @@ # TransportLoop Functions # - cdef int _load(self, void* _vdata, int _size) : + cdef int _load(self, void* _vdata, int _size) nogil : # # This function is called by a soy.transports.Transport for each .soy # packet that's loaded. We store the next packet number in self._state Modified: trunk/pysoy/src/textures/Video.pym =================================================================== --- trunk/pysoy/src/textures/Video.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/textures/Video.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -29,7 +29,7 @@ # C functions # - cdef int _load(self, void* _data, int _size) : + cdef int _load(self, void* _data, int _size) nogil : cdef int x, y, _cx, _cy, _tx, _ty, _yl, _yc cdef int _py, _pu, _pv, _pr, _pg, _pb cdef ogg.ogg_page* _page @@ -138,19 +138,20 @@ return 1 - cdef int _save(self, void *_data, int _size) : + cdef int _save(self, void *_data, int _size) nogil : cdef ogg.ogg_page *_page _page = <ogg.ogg_page*> _data return 1 - cdef int _ready(self) : + cdef int _ready(self) nogil : cdef double _now _now = _time() if self._startTime + self._frameTime < _now : return 1 return 0 + ############################################################################ # # Properties Modified: trunk/pysoy/src/transports/File.pym =================================================================== --- trunk/pysoy/src/transports/File.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/transports/File.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -34,33 +34,33 @@ return 1 - cdef int _read(self, char *_buffer, int _len) : + cdef int _read(self, char *_buffer, int _len) nogil : return stdio.fread(_buffer, 1, _len, self._file) - cdef int _write(self, char *_buffer, int _len) : + cdef int _write(self, char *_buffer, int _len) nogil : return stdio.fwrite(_buffer, 1, _len, self._file) - cdef int _goto(self, long _offset) : + cdef int _goto(self, long _offset) nogil : if _offset >= 0 : return stdio.fseek(self._file, _offset, stdio.SEEK_SET) else : return stdio.fseek(self._file, _offset, stdio.SEEK_END) - cdef int _seek(self, long _offset) : + cdef int _seek(self, long _offset) nogil : return stdio.fseek(self._file, _offset, stdio.SEEK_CUR) - cdef long _tell(self) : + cdef long _tell(self) nogil : return stdio.ftell(self._file) - cdef void _rewind(self) : + cdef void _rewind(self) nogil : stdio.rewind(self._file) - cdef void _close(self) : + cdef void _close(self) nogil : stdio.fclose(self._file) self._file = NULL Modified: trunk/pysoy/src/transports/Transport.pym =================================================================== --- trunk/pysoy/src/transports/Transport.pym 2008-05-18 11:40:12 UTC (rev 1264) +++ trunk/pysoy/src/transports/Transport.pym 2008-05-18 17:14:51 UTC (rev 1265) @@ -82,7 +82,7 @@ # TransportLoop functions # - cdef int _loop(self) : + cdef int _loop(self) nogil : # # If idle, just return now if self._mode == 0 : @@ -114,19 +114,24 @@ self._nobj = self._nobj + 1 return self._nobj-1 - cdef int _indexName(self, char *_name, unsigned char _namelen) : + cdef int _indexName(self, char *_name, unsigned char _namelen) nogil : # # this returns the index of a given object name in self._objs array # - cdef int _i + cdef int _i, _j, _m for _i from 0 <= _i < self._nobj : - if _namelen == self._objs[_i].namelen and \ - _name[:_namelen] == self._objs[_i].name[:_namelen] : - return _i + if _namelen == self._objs[_i].namelen : + _m = 1 + for _j from 0 <= _j < _namelen : + if _name[_j] != self._objs[_i].name[_j] : + _m = 0 + break + if _m == 1 : + return _i return -1 - cdef int _indexSerial(self, int _serialno) : + cdef int _indexSerial(self, int _serialno) nogil : # # this returns the index for a given serialno in the self._objs array # @@ -146,33 +151,34 @@ return 0 - cdef int _read(self, char *_buffer, int _len) : + cdef int _read(self, char *_buffer, int _len) nogil : return 0 - cdef int _write(self, char *_buffer, int _len) : + cdef int _write(self, char *_buffer, int _len) nogil : return 0 - cdef int _goto(self, long _offset) : + cdef int _goto(self, long _offset) nogil : return 0 - cdef int _seek(self, long _offset) : + cdef int _seek(self, long _offset) nogil : return 0 - cdef long _tell(self) : + cdef long _tell(self) nogil : return 0 - cdef void _rewind(self) : + cdef void _rewind(self) nogil : return - cdef void _close(self) : + cdef void _close(self) nogil : return + ############################################################################ # # Ogg functions @@ -226,7 +232,7 @@ self._mode = 1 # Loading - cdef void _oggLoad(self) : + cdef void _oggLoad(self) nogil : cdef int i, _sn cdef ogg.ogg_page _page if not (<soy._internals.Loadable> self._objs[0].object)._ready() : @@ -243,7 +249,7 @@ self._mode = 0 - cdef int _oggReadPage(self, ogg.ogg_page *_oggPage) : + cdef int _oggReadPage(self, ogg.ogg_page *_oggPage) nogil : cdef char *_buffer cdef int _bytes while ogg.ogg_sync_pageout(&self._sync, _oggPage) == 0 : @@ -279,7 +285,7 @@ self._vers = 1 # Soy self._mode = 1 # Loading - cdef void _soyLoad(self) : + cdef void _soyLoad(self) nogil : cdef unsigned char *_data cdef unsigned int _serial, _length self._soyRead(<char*> (&_serial), 4) @@ -294,7 +300,7 @@ (<soy._internals.Loadable> self._objs[_serial].object)._load(_data,_length) py.PyMem_Free(_data) - cdef void _soyRead(self, char *_buffer, int _len) : + cdef void _soyRead(self, char *_buffer, int _len) nogil : cdef int _bytes if self._mode == 0 : return _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn