diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25955cb55e..e032d62e7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,7 @@ on: - '.gitignore' - 'README.rst' - '.github/workflows/manylinux.yml' + - '.github/workflows/ubuntu-sdist.yml' pull_request: branches: main @@ -23,6 +24,7 @@ on: - '.gitignore' - 'README.rst' - '.github/workflows/manylinux.yml' + - '.github/workflows/ubuntu-sdist.yml' jobs: deps: @@ -77,32 +79,35 @@ jobs: # builds on macOS include: - { - name: "MacOS x86_64 (cp36-pp36)", - cibuildver: 1, + name: "MacOS x86_64 (cp36-cp37)", os: macos-10.15, macarch: x86_64, - pyversions: cp36-* pp36-* + pyversions: cp36-* cp37-* } - { - name: "MacOS x86_64 (cp37-pp37)", - cibuildver: 2, + name: "MacOS x86_64 (cp37-cp38)", os: macos-10.15, macarch: x86_64, - pyversions: cp37-* pp37-* + pyversions: cp37-* cp38-* } - { - name: "MacOS x86_64 (cp38-cp39-cp310)", - cibuildver: 2, + name: "MacOS x86_64 (cp39-cp310)", os: macos-10.15, macarch: x86_64, - pyversions: cp38-* cp39-* cp310-* + pyversions: cp39-* cp310-* + } + + - { + name: "MacOS x86_64 (pp37)", + os: macos-10.15, + macarch: x86_64, + pyversions: pp37-* } - { name: "MacOS arm64 (cp38-cp39-cp310)", - cibuildver: 2, os: macos-11, macarch: arm64, pyversions: cp38-* cp39-* cp310-* @@ -155,15 +160,8 @@ jobs: path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }} key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }} - # use cibuildwheel v1 to build on older python versions - - name: Build wheels with CIBuildWheel v1 - if: matrix.cibuildver == 1 - uses: pypa/cibuildwheel@v1.12.0 - - # use latest cibuildwheel for newer python versions - - name: Build wheels with CIBuildWheel v2 - if: matrix.cibuildver == 2 - uses: pypa/cibuildwheel@v2.1.3 + - name: Build and test wheels + uses: pypa/cibuildwheel@v2.2.2 env: # Build arm64 and x86_64 wheels too on an Intel runner. # Note that the arm64 wheels cannot be tested on CI in this configuration diff --git a/.github/workflows/manylinux.yml b/.github/workflows/manylinux.yml index 55f7fe3512..ac71f37331 100644 --- a/.github/workflows/manylinux.yml +++ b/.github/workflows/manylinux.yml @@ -14,6 +14,7 @@ on: - '.gitignore' - 'README.rst' - '.github/workflows/build.yml' + - '.github/workflows/ubuntu-sdist.yml' pull_request: branches: main @@ -23,6 +24,7 @@ on: - '.gitignore' - 'README.rst' - '.github/workflows/build.yml' + - '.github/workflows/ubuntu-sdist.yml' jobs: build-manylinux: @@ -31,14 +33,14 @@ jobs: fail-fast: false # if a particular matrix build fails, don't skip the rest matrix: arch: ['x64', 'x86', 'aarch64'] - tag: ['-manylinux1-', '-manylinux2010-', -manylinux2014-] + tag: ['manylinux1', 'manylinux2010', 'manylinux2014'] exclude: # aarch64 only with manylinux2014 for now - arch: 'aarch64' - tag: '-manylinux1-' + tag: 'manylinux1' - arch: 'aarch64' - tag: '-manylinux2010-' + tag: 'manylinux2010' steps: - uses: actions/checkout@v2.3.4 @@ -52,7 +54,7 @@ jobs: - name: Build manylinux wheels run: | cd buildconfig/manylinux-build - make pull${{ matrix.tag }}${{ matrix.arch }} wheels${{ matrix.tag }}${{ matrix.arch }} + make pull-${{ matrix.tag }}-${{ matrix.arch }} wheels-${{ matrix.tag }}-${{ matrix.arch }} cd ../.. mkdir -p dist/ cp buildconfig/manylinux-build/wheelhouse/*.whl dist/ diff --git a/.github/workflows/ubuntu-sdist.yml b/.github/workflows/ubuntu-sdist.yml new file mode 100644 index 0000000000..f5c2652612 --- /dev/null +++ b/.github/workflows/ubuntu-sdist.yml @@ -0,0 +1,80 @@ +name: Ubuntu sdist + +# Run CI only when a release is created, on changes to main branch, or any PR +# to main. Do not run CI on any other branch. Also, skip any non-source changes +# from running on CI +on: + release: + types: [created] + push: + branches: main + paths-ignore: + - 'docs/**' + - 'examples/**' + - '.gitignore' + - 'README.rst' + - '.github/workflows/build.yml' + - '.github/workflows/manylinux.yml' + + pull_request: + branches: main + paths-ignore: + - 'docs/**' + - 'examples/**' + - '.gitignore' + - 'README.rst' + - '.github/workflows/build.yml' + - '.github/workflows/manylinux.yml' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false # if a particular matrix build fails, don't skip the rest + matrix: + os: [ubuntu-18.04, ubuntu-20.04] + + steps: + - uses: actions/checkout@v2.3.4 + + - name: Install deps + run: | + sudo apt-get update --fix-missing + sudo apt-get upgrade + sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev libjpeg8-dev python3-setuptools python3-dev python3-numpy + + - name: Make sdist and install it + run: | + python3 setup.py sdist + pip3 install dist/pygame-*.tar.gz -vv + + - name: Run tests + env: + SDL_VIDEODRIVER: "dummy" + SDL_AUDIODRIVER: "disk" + run: python3 -m pygame.tests -v --exclude opengl,timing --time_out 300 + + # We upload the generated files under github actions assets + - name: Upload sdist + if: matrix.os == 'ubuntu-18.04' # upload sdist only once + uses: actions/upload-artifact@v2 + with: + name: pygame-sdist + path: dist/*.tar.gz + +# - name: Upload binaries to Github Releases +# if: github.event_name == 'release' && matrix.os == 'ubuntu-18.04' # upload sdist only once +# uses: svenstaro/upload-release-action@v2 +# with: +# repo_token: ${{ secrets.GITHUB_TOKEN }} +# file: dist/*.tar.gz +# tag: ${{ github.ref }} +# +# - name: Upload binaries to PyPI +# if: github.event_name == 'release' && matrix.os == 'ubuntu-18.04' # upload sdist only once +# env: +# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} +# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} +# run: | +# python3 -m pip install twine +# twine upload dist/*.tar.gz diff --git a/src_c/_sdl2/controller.c b/src_c/_sdl2/controller.c index 65f8e36332..a885bf2dde 100644 --- a/src_c/_sdl2/controller.c +++ b/src_c/_sdl2/controller.c @@ -1531,7 +1531,7 @@ static PyObject *__pyx_codeobj__24; static PyObject *__pyx_codeobj__26; /* Late includes */ -/* "pygame/_sdl2/controller.pyx":15 +/* "pygame/_sdl2/controller.pyx":16 * import_pygame_joystick() * * def GAMECONTROLLER_INIT_CHECK(): # <<<<<<<<<<<<<< @@ -1565,7 +1565,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_GAMECONTROLLER_INIT_CHECK( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("GAMECONTROLLER_INIT_CHECK", 0); - /* "pygame/_sdl2/controller.pyx":16 + /* "pygame/_sdl2/controller.pyx":17 * * def GAMECONTROLLER_INIT_CHECK(): * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< @@ -1575,14 +1575,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_GAMECONTROLLER_INIT_CHECK( __pyx_t_1 = ((!(SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/controller.pyx":17 + /* "pygame/_sdl2/controller.pyx":18 * def GAMECONTROLLER_INIT_CHECK(): * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * raise error("gamecontroller system not initialized") # <<<<<<<<<<<<<< * * cdef bint _controller_autoinit(): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -1596,14 +1596,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_GAMECONTROLLER_INIT_CHECK( } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_gamecontroller_system_not_initia) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_gamecontroller_system_not_initia); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 17, __pyx_L1_error) + __PYX_ERR(0, 18, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":16 + /* "pygame/_sdl2/controller.pyx":17 * * def GAMECONTROLLER_INIT_CHECK(): * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< @@ -1612,7 +1612,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_GAMECONTROLLER_INIT_CHECK( */ } - /* "pygame/_sdl2/controller.pyx":15 + /* "pygame/_sdl2/controller.pyx":16 * import_pygame_joystick() * * def GAMECONTROLLER_INIT_CHECK(): # <<<<<<<<<<<<<< @@ -1635,7 +1635,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_GAMECONTROLLER_INIT_CHECK( return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":19 +/* "pygame/_sdl2/controller.pyx":20 * raise error("gamecontroller system not initialized") * * cdef bint _controller_autoinit(): # <<<<<<<<<<<<<< @@ -1649,7 +1649,7 @@ static int __pyx_f_6pygame_5_sdl2_10controller__controller_autoinit(void) { int __pyx_t_1; __Pyx_RefNannySetupContext("_controller_autoinit", 0); - /* "pygame/_sdl2/controller.pyx":20 + /* "pygame/_sdl2/controller.pyx":21 * * cdef bint _controller_autoinit(): * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< @@ -1659,7 +1659,7 @@ static int __pyx_f_6pygame_5_sdl2_10controller__controller_autoinit(void) { __pyx_t_1 = ((!(SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 0)) != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/controller.pyx":21 + /* "pygame/_sdl2/controller.pyx":22 * cdef bint _controller_autoinit(): * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< @@ -1669,7 +1669,7 @@ static int __pyx_f_6pygame_5_sdl2_10controller__controller_autoinit(void) { __pyx_t_1 = (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/controller.pyx":22 + /* "pygame/_sdl2/controller.pyx":23 * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER): * return False # <<<<<<<<<<<<<< @@ -1679,7 +1679,7 @@ static int __pyx_f_6pygame_5_sdl2_10controller__controller_autoinit(void) { __pyx_r = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":21 + /* "pygame/_sdl2/controller.pyx":22 * cdef bint _controller_autoinit(): * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * if SDL_InitSubSystem(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< @@ -1688,7 +1688,7 @@ static int __pyx_f_6pygame_5_sdl2_10controller__controller_autoinit(void) { */ } - /* "pygame/_sdl2/controller.pyx":20 + /* "pygame/_sdl2/controller.pyx":21 * * cdef bint _controller_autoinit(): * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< @@ -1697,7 +1697,7 @@ static int __pyx_f_6pygame_5_sdl2_10controller__controller_autoinit(void) { */ } - /* "pygame/_sdl2/controller.pyx":24 + /* "pygame/_sdl2/controller.pyx":25 * return False * #pg_RegisterQuit(_controller_autoquit) * return True # <<<<<<<<<<<<<< @@ -1707,7 +1707,7 @@ static int __pyx_f_6pygame_5_sdl2_10controller__controller_autoinit(void) { __pyx_r = 1; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":19 + /* "pygame/_sdl2/controller.pyx":20 * raise error("gamecontroller system not initialized") * * cdef bint _controller_autoinit(): # <<<<<<<<<<<<<< @@ -1721,7 +1721,7 @@ static int __pyx_f_6pygame_5_sdl2_10controller__controller_autoinit(void) { return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":26 +/* "pygame/_sdl2/controller.pyx":27 * return True * * cdef void _controller_autoquit(): # <<<<<<<<<<<<<< @@ -1745,22 +1745,22 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_controller_autoquit", 0); - /* "pygame/_sdl2/controller.pyx":28 + /* "pygame/_sdl2/controller.pyx":29 * cdef void _controller_autoquit(): * cdef Controller controller * for c in Controller._controllers: # <<<<<<<<<<<<<< * controller = c * controller.quit() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -1768,17 +1768,17 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 29, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 29, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -1788,7 +1788,7 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 28, __pyx_L1_error) + else __PYX_ERR(0, 29, __pyx_L1_error) } break; } @@ -1797,27 +1797,27 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":29 + /* "pygame/_sdl2/controller.pyx":30 * cdef Controller controller * for c in Controller._controllers: * controller = c # <<<<<<<<<<<<<< * controller.quit() * controller._controller = NULL */ - if (!(likely(((__pyx_v_c) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_c, __pyx_ptype_6pygame_5_sdl2_10controller_Controller))))) __PYX_ERR(0, 29, __pyx_L1_error) + if (!(likely(((__pyx_v_c) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_c, __pyx_ptype_6pygame_5_sdl2_10controller_Controller))))) __PYX_ERR(0, 30, __pyx_L1_error) __pyx_t_1 = __pyx_v_c; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_controller, ((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_t_1)); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":30 + /* "pygame/_sdl2/controller.pyx":31 * for c in Controller._controllers: * controller = c * controller.quit() # <<<<<<<<<<<<<< * controller._controller = NULL * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_controller), __pyx_n_s_quit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_controller), __pyx_n_s_quit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -1831,12 +1831,12 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":31 + /* "pygame/_sdl2/controller.pyx":32 * controller = c * controller.quit() * controller._controller = NULL # <<<<<<<<<<<<<< @@ -1845,7 +1845,7 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { */ __pyx_v_controller->_controller = NULL; - /* "pygame/_sdl2/controller.pyx":28 + /* "pygame/_sdl2/controller.pyx":29 * cdef void _controller_autoquit(): * cdef Controller controller * for c in Controller._controllers: # <<<<<<<<<<<<<< @@ -1855,16 +1855,16 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":33 + /* "pygame/_sdl2/controller.pyx":34 * controller._controller = NULL * * Controller._controllers.clear() # <<<<<<<<<<<<<< * * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_clear); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -1879,12 +1879,12 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":35 + /* "pygame/_sdl2/controller.pyx":36 * Controller._controllers.clear() * * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< @@ -1894,7 +1894,7 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { __pyx_t_7 = (SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 0); if (__pyx_t_7) { - /* "pygame/_sdl2/controller.pyx":36 + /* "pygame/_sdl2/controller.pyx":37 * * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) # <<<<<<<<<<<<<< @@ -1903,7 +1903,7 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { */ SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER); - /* "pygame/_sdl2/controller.pyx":35 + /* "pygame/_sdl2/controller.pyx":36 * Controller._controllers.clear() * * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< @@ -1912,7 +1912,7 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { */ } - /* "pygame/_sdl2/controller.pyx":26 + /* "pygame/_sdl2/controller.pyx":27 * return True * * cdef void _controller_autoquit(): # <<<<<<<<<<<<<< @@ -1934,7 +1934,7 @@ static void __pyx_f_6pygame_5_sdl2_10controller__controller_autoquit(void) { __Pyx_RefNannyFinishContext(); } -/* "pygame/_sdl2/controller.pyx":40 +/* "pygame/_sdl2/controller.pyx":41 * # not automatically initialize controller at this moment. * * def __PYGAMEinit__(**kwargs): # <<<<<<<<<<<<<< @@ -1966,7 +1966,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_2__PYGAMEinit__(CYTHON_UNU __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__PYGAMEinit__", 0); - /* "pygame/_sdl2/controller.pyx":41 + /* "pygame/_sdl2/controller.pyx":42 * * def __PYGAMEinit__(**kwargs): * _controller_autoinit() # <<<<<<<<<<<<<< @@ -1975,7 +1975,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_2__PYGAMEinit__(CYTHON_UNU */ (void)(__pyx_f_6pygame_5_sdl2_10controller__controller_autoinit()); - /* "pygame/_sdl2/controller.pyx":40 + /* "pygame/_sdl2/controller.pyx":41 * # not automatically initialize controller at this moment. * * def __PYGAMEinit__(**kwargs): # <<<<<<<<<<<<<< @@ -1990,7 +1990,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_2__PYGAMEinit__(CYTHON_UNU return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":43 +/* "pygame/_sdl2/controller.pyx":44 * _controller_autoinit() * * def init(): # <<<<<<<<<<<<<< @@ -2024,7 +2024,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_4init(CYTHON_UNUSED PyObje int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init", 0); - /* "pygame/_sdl2/controller.pyx":44 + /* "pygame/_sdl2/controller.pyx":45 * * def init(): * if not _controller_autoinit(): # <<<<<<<<<<<<<< @@ -2034,14 +2034,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_4init(CYTHON_UNUSED PyObje __pyx_t_1 = ((!(__pyx_f_6pygame_5_sdl2_10controller__controller_autoinit() != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/controller.pyx":45 + /* "pygame/_sdl2/controller.pyx":46 * def init(): * if not _controller_autoinit(): * raise error() # <<<<<<<<<<<<<< * * def get_init(): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -2055,14 +2055,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_4init(CYTHON_UNUSED PyObje } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 45, __pyx_L1_error) + __PYX_ERR(0, 46, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":44 + /* "pygame/_sdl2/controller.pyx":45 * * def init(): * if not _controller_autoinit(): # <<<<<<<<<<<<<< @@ -2071,7 +2071,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_4init(CYTHON_UNUSED PyObje */ } - /* "pygame/_sdl2/controller.pyx":43 + /* "pygame/_sdl2/controller.pyx":44 * _controller_autoinit() * * def init(): # <<<<<<<<<<<<<< @@ -2094,7 +2094,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_4init(CYTHON_UNUSED PyObje return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":47 +/* "pygame/_sdl2/controller.pyx":48 * raise error() * * def get_init(): # <<<<<<<<<<<<<< @@ -2125,7 +2125,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_6get_init(CYTHON_UNUSED Py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_init", 0); - /* "pygame/_sdl2/controller.pyx":48 + /* "pygame/_sdl2/controller.pyx":49 * * def get_init(): * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 # <<<<<<<<<<<<<< @@ -2133,13 +2133,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_6get_init(CYTHON_UNUSED Py * def quit(): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((!((SDL_WasInit(SDL_INIT_GAMECONTROLLER) == 0) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!((SDL_WasInit(SDL_INIT_GAMECONTROLLER) == 0) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":47 + /* "pygame/_sdl2/controller.pyx":48 * raise error() * * def get_init(): # <<<<<<<<<<<<<< @@ -2158,7 +2158,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_6get_init(CYTHON_UNUSED Py return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":50 +/* "pygame/_sdl2/controller.pyx":51 * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * * def quit(): # <<<<<<<<<<<<<< @@ -2186,7 +2186,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_8quit(CYTHON_UNUSED PyObje int __pyx_t_1; __Pyx_RefNannySetupContext("quit", 0); - /* "pygame/_sdl2/controller.pyx":51 + /* "pygame/_sdl2/controller.pyx":52 * * def quit(): * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< @@ -2196,7 +2196,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_8quit(CYTHON_UNUSED PyObje __pyx_t_1 = (SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/controller.pyx":52 + /* "pygame/_sdl2/controller.pyx":53 * def quit(): * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) # <<<<<<<<<<<<<< @@ -2205,7 +2205,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_8quit(CYTHON_UNUSED PyObje */ SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER); - /* "pygame/_sdl2/controller.pyx":51 + /* "pygame/_sdl2/controller.pyx":52 * * def quit(): * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): # <<<<<<<<<<<<<< @@ -2214,7 +2214,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_8quit(CYTHON_UNUSED PyObje */ } - /* "pygame/_sdl2/controller.pyx":50 + /* "pygame/_sdl2/controller.pyx":51 * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * * def quit(): # <<<<<<<<<<<<<< @@ -2229,7 +2229,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_8quit(CYTHON_UNUSED PyObje return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":54 +/* "pygame/_sdl2/controller.pyx":55 * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * * def set_eventstate(state): # <<<<<<<<<<<<<< @@ -2263,14 +2263,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10set_eventstate(CYTHON_UN int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_eventstate", 0); - /* "pygame/_sdl2/controller.pyx":55 + /* "pygame/_sdl2/controller.pyx":56 * * def set_eventstate(state): * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * SDL_GameControllerEventState(int(state)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2284,25 +2284,25 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10set_eventstate(CYTHON_UN } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":56 + /* "pygame/_sdl2/controller.pyx":57 * def set_eventstate(state): * GAMECONTROLLER_INIT_CHECK() * SDL_GameControllerEventState(int(state)) # <<<<<<<<<<<<<< * * def get_eventstate(): */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; (void)(SDL_GameControllerEventState(__pyx_t_4)); - /* "pygame/_sdl2/controller.pyx":54 + /* "pygame/_sdl2/controller.pyx":55 * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * * def set_eventstate(state): # <<<<<<<<<<<<<< @@ -2325,7 +2325,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10set_eventstate(CYTHON_UN return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":58 +/* "pygame/_sdl2/controller.pyx":59 * SDL_GameControllerEventState(int(state)) * * def get_eventstate(): # <<<<<<<<<<<<<< @@ -2358,14 +2358,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_12get_eventstate(CYTHON_UN int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_eventstate", 0); - /* "pygame/_sdl2/controller.pyx":59 + /* "pygame/_sdl2/controller.pyx":60 * * def get_eventstate(): * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * return SDL_GameControllerEventState(-1) == 1 * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2379,12 +2379,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_12get_eventstate(CYTHON_UN } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":60 + /* "pygame/_sdl2/controller.pyx":61 * def get_eventstate(): * GAMECONTROLLER_INIT_CHECK() * return SDL_GameControllerEventState(-1) == 1 # <<<<<<<<<<<<<< @@ -2392,13 +2392,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_12get_eventstate(CYTHON_UN * def get_count(): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_GameControllerEventState(-1) == 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_GameControllerEventState(-1) == 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":58 + /* "pygame/_sdl2/controller.pyx":59 * SDL_GameControllerEventState(int(state)) * * def get_eventstate(): # <<<<<<<<<<<<<< @@ -2419,7 +2419,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_12get_eventstate(CYTHON_UN return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":62 +/* "pygame/_sdl2/controller.pyx":63 * return SDL_GameControllerEventState(-1) == 1 * * def get_count(): # <<<<<<<<<<<<<< @@ -2455,7 +2455,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_14get_count(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_count", 0); - /* "pygame/_sdl2/controller.pyx":65 + /* "pygame/_sdl2/controller.pyx":66 * """ Returns the number of attached joysticks. * """ * num = SDL_NumJoysticks() # <<<<<<<<<<<<<< @@ -2464,7 +2464,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_14get_count(CYTHON_UNUSED */ __pyx_v_num = SDL_NumJoysticks(); - /* "pygame/_sdl2/controller.pyx":66 + /* "pygame/_sdl2/controller.pyx":67 * """ * num = SDL_NumJoysticks() * if num < 0: # <<<<<<<<<<<<<< @@ -2474,14 +2474,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_14get_count(CYTHON_UNUSED __pyx_t_1 = ((__pyx_v_num < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/controller.pyx":67 + /* "pygame/_sdl2/controller.pyx":68 * num = SDL_NumJoysticks() * if num < 0: * raise error() # <<<<<<<<<<<<<< * return num * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -2495,14 +2495,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_14get_count(CYTHON_UNUSED } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 67, __pyx_L1_error) + __PYX_ERR(0, 68, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":66 + /* "pygame/_sdl2/controller.pyx":67 * """ * num = SDL_NumJoysticks() * if num < 0: # <<<<<<<<<<<<<< @@ -2511,7 +2511,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_14get_count(CYTHON_UNUSED */ } - /* "pygame/_sdl2/controller.pyx":68 + /* "pygame/_sdl2/controller.pyx":69 * if num < 0: * raise error() * return num # <<<<<<<<<<<<<< @@ -2519,13 +2519,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_14get_count(CYTHON_UNUSED * def update(): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":62 + /* "pygame/_sdl2/controller.pyx":63 * return SDL_GameControllerEventState(-1) == 1 * * def get_count(): # <<<<<<<<<<<<<< @@ -2546,7 +2546,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_14get_count(CYTHON_UNUSED return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":70 +/* "pygame/_sdl2/controller.pyx":71 * return num * * def update(): # <<<<<<<<<<<<<< @@ -2580,14 +2580,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_16update(CYTHON_UNUSED PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update", 0); - /* "pygame/_sdl2/controller.pyx":74 + /* "pygame/_sdl2/controller.pyx":75 * not necessary to call this function. * """ * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * SDL_GameControllerUpdate() * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2601,12 +2601,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_16update(CYTHON_UNUSED PyO } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":75 + /* "pygame/_sdl2/controller.pyx":76 * """ * GAMECONTROLLER_INIT_CHECK() * SDL_GameControllerUpdate() # <<<<<<<<<<<<<< @@ -2615,7 +2615,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_16update(CYTHON_UNUSED PyO */ SDL_GameControllerUpdate(); - /* "pygame/_sdl2/controller.pyx":70 + /* "pygame/_sdl2/controller.pyx":71 * return num * * def update(): # <<<<<<<<<<<<<< @@ -2638,7 +2638,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_16update(CYTHON_UNUSED PyO return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":77 +/* "pygame/_sdl2/controller.pyx":78 * SDL_GameControllerUpdate() * * def is_controller(index): # <<<<<<<<<<<<<< @@ -2673,14 +2673,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_18is_controller(CYTHON_UNU int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_controller", 0); - /* "pygame/_sdl2/controller.pyx":84 + /* "pygame/_sdl2/controller.pyx":85 * :return: 1 if supported, 0 if unsupported or invalid index. * """ * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * return SDL_IsGameController(index) == 1 * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2694,12 +2694,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_18is_controller(CYTHON_UNU } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":85 + /* "pygame/_sdl2/controller.pyx":86 * """ * GAMECONTROLLER_INIT_CHECK() * return SDL_IsGameController(index) == 1 # <<<<<<<<<<<<<< @@ -2707,14 +2707,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_18is_controller(CYTHON_UNU * def name_forindex(index): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_IsGameController(__pyx_t_4) == 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_IsGameController(__pyx_t_4) == 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":77 + /* "pygame/_sdl2/controller.pyx":78 * SDL_GameControllerUpdate() * * def is_controller(index): # <<<<<<<<<<<<<< @@ -2735,7 +2735,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_18is_controller(CYTHON_UNU return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":87 +/* "pygame/_sdl2/controller.pyx":88 * return SDL_IsGameController(index) == 1 * * def name_forindex(index): # <<<<<<<<<<<<<< @@ -2773,14 +2773,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNU int __pyx_clineno = 0; __Pyx_RefNannySetupContext("name_forindex", 0); - /* "pygame/_sdl2/controller.pyx":91 + /* "pygame/_sdl2/controller.pyx":92 * or NULL if there's no name or the index is invalid. * """ * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * max_controllers = SDL_NumJoysticks() * if max_controllers < 0: */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2794,12 +2794,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNU } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":92 + /* "pygame/_sdl2/controller.pyx":93 * """ * GAMECONTROLLER_INIT_CHECK() * max_controllers = SDL_NumJoysticks() # <<<<<<<<<<<<<< @@ -2808,7 +2808,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNU */ __pyx_v_max_controllers = SDL_NumJoysticks(); - /* "pygame/_sdl2/controller.pyx":93 + /* "pygame/_sdl2/controller.pyx":94 * GAMECONTROLLER_INIT_CHECK() * max_controllers = SDL_NumJoysticks() * if max_controllers < 0: # <<<<<<<<<<<<<< @@ -2818,14 +2818,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNU __pyx_t_4 = ((__pyx_v_max_controllers < 0) != 0); if (unlikely(__pyx_t_4)) { - /* "pygame/_sdl2/controller.pyx":94 + /* "pygame/_sdl2/controller.pyx":95 * max_controllers = SDL_NumJoysticks() * if max_controllers < 0: * raise error() # <<<<<<<<<<<<<< * * if 0 <= index < max_controllers: */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2839,14 +2839,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNU } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 94, __pyx_L1_error) + __PYX_ERR(0, 95, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":93 + /* "pygame/_sdl2/controller.pyx":94 * GAMECONTROLLER_INIT_CHECK() * max_controllers = SDL_NumJoysticks() * if max_controllers < 0: # <<<<<<<<<<<<<< @@ -2855,26 +2855,26 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNU */ } - /* "pygame/_sdl2/controller.pyx":96 + /* "pygame/_sdl2/controller.pyx":97 * raise error() * * if 0 <= index < max_controllers: # <<<<<<<<<<<<<< * return SDL_GameControllerNameForIndex(index).decode('utf-8') * */ - __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_index, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_index, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) if (__Pyx_PyObject_IsTrue(__pyx_t_1)) { __Pyx_DECREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_max_controllers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_max_controllers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_v_index, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_index, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "pygame/_sdl2/controller.pyx":97 + /* "pygame/_sdl2/controller.pyx":98 * * if 0 <= index < max_controllers: * return SDL_GameControllerNameForIndex(index).decode('utf-8') # <<<<<<<<<<<<<< @@ -2882,16 +2882,16 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNU * return None */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error) __pyx_t_6 = SDL_GameControllerNameForIndex(__pyx_t_5); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":96 + /* "pygame/_sdl2/controller.pyx":97 * raise error() * * if 0 <= index < max_controllers: # <<<<<<<<<<<<<< @@ -2900,7 +2900,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNU */ } - /* "pygame/_sdl2/controller.pyx":99 + /* "pygame/_sdl2/controller.pyx":100 * return SDL_GameControllerNameForIndex(index).decode('utf-8') * * return None # <<<<<<<<<<<<<< @@ -2911,7 +2911,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNU __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":87 + /* "pygame/_sdl2/controller.pyx":88 * return SDL_IsGameController(index) == 1 * * def name_forindex(index): # <<<<<<<<<<<<<< @@ -2932,7 +2932,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_20name_forindex(CYTHON_UNU return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":104 +/* "pygame/_sdl2/controller.pyx":105 * _controllers = [] * * def __init__(self, int index): # <<<<<<<<<<<<<< @@ -2973,18 +2973,18 @@ static int __pyx_pw_6pygame_5_sdl2_10controller_10Controller_1__init__(PyObject else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 104, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 105, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } - __pyx_v_index = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error) + __pyx_v_index = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 104, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 105, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.controller.Controller.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3011,14 +3011,14 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sdl2/controller.pyx":109 + /* "pygame/_sdl2/controller.pyx":110 * :param int index: Index of the joystick. * """ * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * if not SDL_IsGameController(index): * raise error('Index is invalid or not a supported joystick.') */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -3032,12 +3032,12 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":110 + /* "pygame/_sdl2/controller.pyx":111 * """ * GAMECONTROLLER_INIT_CHECK() * if not SDL_IsGameController(index): # <<<<<<<<<<<<<< @@ -3047,14 +3047,14 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p __pyx_t_4 = ((!(SDL_IsGameController(__pyx_v_index) != 0)) != 0); if (unlikely(__pyx_t_4)) { - /* "pygame/_sdl2/controller.pyx":111 + /* "pygame/_sdl2/controller.pyx":112 * GAMECONTROLLER_INIT_CHECK() * if not SDL_IsGameController(index): * raise error('Index is invalid or not a supported joystick.') # <<<<<<<<<<<<<< * * self._controller = SDL_GameControllerOpen(index) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -3068,14 +3068,14 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_Index_is_invalid_or_not_a_suppor) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_Index_is_invalid_or_not_a_suppor); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 111, __pyx_L1_error) + __PYX_ERR(0, 112, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":110 + /* "pygame/_sdl2/controller.pyx":111 * """ * GAMECONTROLLER_INIT_CHECK() * if not SDL_IsGameController(index): # <<<<<<<<<<<<<< @@ -3084,7 +3084,7 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p */ } - /* "pygame/_sdl2/controller.pyx":113 + /* "pygame/_sdl2/controller.pyx":114 * raise error('Index is invalid or not a supported joystick.') * * self._controller = SDL_GameControllerOpen(index) # <<<<<<<<<<<<<< @@ -3093,7 +3093,7 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p */ __pyx_v_self->_controller = SDL_GameControllerOpen(__pyx_v_index); - /* "pygame/_sdl2/controller.pyx":114 + /* "pygame/_sdl2/controller.pyx":115 * * self._controller = SDL_GameControllerOpen(index) * self._index = index # <<<<<<<<<<<<<< @@ -3102,7 +3102,7 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p */ __pyx_v_self->_index = __pyx_v_index; - /* "pygame/_sdl2/controller.pyx":115 + /* "pygame/_sdl2/controller.pyx":116 * self._controller = SDL_GameControllerOpen(index) * self._index = index * if not self._controller: # <<<<<<<<<<<<<< @@ -3112,18 +3112,18 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p __pyx_t_4 = ((!(__pyx_v_self->_controller != 0)) != 0); if (unlikely(__pyx_t_4)) { - /* "pygame/_sdl2/controller.pyx":116 + /* "pygame/_sdl2/controller.pyx":117 * self._index = index * if not self._controller: * raise error('Could not open controller %d.' % index) # <<<<<<<<<<<<<< * * Controller._controllers.append(self) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Could_not_open_controller_d, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Could_not_open_controller_d, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -3139,14 +3139,14 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 116, __pyx_L1_error) + __PYX_ERR(0, 117, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":115 + /* "pygame/_sdl2/controller.pyx":116 * self._controller = SDL_GameControllerOpen(index) * self._index = index * if not self._controller: # <<<<<<<<<<<<<< @@ -3155,19 +3155,19 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p */ } - /* "pygame/_sdl2/controller.pyx":118 + /* "pygame/_sdl2/controller.pyx":119 * raise error('Could not open controller %d.' % index) * * Controller._controllers.append(self) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_Append(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_t_1, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":104 + /* "pygame/_sdl2/controller.pyx":105 * _controllers = [] * * def __init__(self, int index): # <<<<<<<<<<<<<< @@ -3190,7 +3190,7 @@ static int __pyx_pf_6pygame_5_sdl2_10controller_10Controller___init__(struct __p return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":120 +/* "pygame/_sdl2/controller.pyx":121 * Controller._controllers.append(self) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -3223,7 +3223,7 @@ static void __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "pygame/_sdl2/controller.pyx":121 + /* "pygame/_sdl2/controller.pyx":122 * * def __dealloc__(self): * try: # <<<<<<<<<<<<<< @@ -3239,16 +3239,16 @@ static void __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(struc __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "pygame/_sdl2/controller.pyx":122 + /* "pygame/_sdl2/controller.pyx":123 * def __dealloc__(self): * try: * Controller._controllers.remove(self) # <<<<<<<<<<<<<< * except ValueError: * pass # Controller is not in list. */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_n_s_controllers); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -3263,12 +3263,12 @@ static void __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(struc } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pygame/_sdl2/controller.pyx":121 + /* "pygame/_sdl2/controller.pyx":122 * * def __dealloc__(self): * try: # <<<<<<<<<<<<<< @@ -3285,7 +3285,7 @@ static void __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(struc __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "pygame/_sdl2/controller.pyx":123 + /* "pygame/_sdl2/controller.pyx":124 * try: * Controller._controllers.remove(self) * except ValueError: # <<<<<<<<<<<<<< @@ -3300,7 +3300,7 @@ static void __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(struc goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "pygame/_sdl2/controller.pyx":121 + /* "pygame/_sdl2/controller.pyx":122 * * def __dealloc__(self): * try: # <<<<<<<<<<<<<< @@ -3320,14 +3320,14 @@ static void __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(struc __pyx_L8_try_end:; } - /* "pygame/_sdl2/controller.pyx":126 + /* "pygame/_sdl2/controller.pyx":127 * pass # Controller is not in list. * * self.quit() # <<<<<<<<<<<<<< * * def _CLOSEDCHECK(self): */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_quit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_quit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -3341,12 +3341,12 @@ static void __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(struc } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pygame/_sdl2/controller.pyx":120 + /* "pygame/_sdl2/controller.pyx":121 * Controller._controllers.append(self) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -3365,7 +3365,7 @@ static void __pyx_pf_6pygame_5_sdl2_10controller_10Controller_2__dealloc__(struc __Pyx_RefNannyFinishContext(); } -/* "pygame/_sdl2/controller.pyx":128 +/* "pygame/_sdl2/controller.pyx":129 * self.quit() * * def _CLOSEDCHECK(self): # <<<<<<<<<<<<<< @@ -3398,7 +3398,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4_CLOSEDCHECK int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_CLOSEDCHECK", 0); - /* "pygame/_sdl2/controller.pyx":129 + /* "pygame/_sdl2/controller.pyx":130 * * def _CLOSEDCHECK(self): * if not self._controller: # <<<<<<<<<<<<<< @@ -3408,14 +3408,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4_CLOSEDCHECK __pyx_t_1 = ((!(__pyx_v_self->_controller != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/controller.pyx":130 + /* "pygame/_sdl2/controller.pyx":131 * def _CLOSEDCHECK(self): * if not self._controller: * raise error('called on a closed controller') # <<<<<<<<<<<<<< * * def init(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -3429,14 +3429,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4_CLOSEDCHECK } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_called_on_a_closed_controller) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_called_on_a_closed_controller); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 130, __pyx_L1_error) + __PYX_ERR(0, 131, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":129 + /* "pygame/_sdl2/controller.pyx":130 * * def _CLOSEDCHECK(self): * if not self._controller: # <<<<<<<<<<<<<< @@ -3445,7 +3445,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4_CLOSEDCHECK */ } - /* "pygame/_sdl2/controller.pyx":128 + /* "pygame/_sdl2/controller.pyx":129 * self.quit() * * def _CLOSEDCHECK(self): # <<<<<<<<<<<<<< @@ -3468,7 +3468,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4_CLOSEDCHECK return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":132 +/* "pygame/_sdl2/controller.pyx":133 * raise error('called on a closed controller') * * def init(self): # <<<<<<<<<<<<<< @@ -3501,16 +3501,16 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_6init(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init", 0); - /* "pygame/_sdl2/controller.pyx":133 + /* "pygame/_sdl2/controller.pyx":134 * * def init(self): * self.__init__(self._index) # <<<<<<<<<<<<<< * * def get_init(self): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -3525,12 +3525,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_6init(struct __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":132 + /* "pygame/_sdl2/controller.pyx":133 * raise error('called on a closed controller') * * def init(self): # <<<<<<<<<<<<<< @@ -3554,7 +3554,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_6init(struct return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":135 +/* "pygame/_sdl2/controller.pyx":136 * self.__init__(self._index) * * def get_init(self): # <<<<<<<<<<<<<< @@ -3584,7 +3584,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_8get_init(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_init", 0); - /* "pygame/_sdl2/controller.pyx":136 + /* "pygame/_sdl2/controller.pyx":137 * * def get_init(self): * return not self._controller == NULL # <<<<<<<<<<<<<< @@ -3592,13 +3592,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_8get_init(str * def quit(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((!((__pyx_v_self->_controller == NULL) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!((__pyx_v_self->_controller == NULL) != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":135 + /* "pygame/_sdl2/controller.pyx":136 * self.__init__(self._index) * * def get_init(self): # <<<<<<<<<<<<<< @@ -3617,7 +3617,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_8get_init(str return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":138 +/* "pygame/_sdl2/controller.pyx":139 * return not self._controller == NULL * * def quit(self): # <<<<<<<<<<<<<< @@ -3644,7 +3644,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_10quit(struct int __pyx_t_1; __Pyx_RefNannySetupContext("quit", 0); - /* "pygame/_sdl2/controller.pyx":139 + /* "pygame/_sdl2/controller.pyx":140 * * def quit(self): * if self._controller: # <<<<<<<<<<<<<< @@ -3654,7 +3654,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_10quit(struct __pyx_t_1 = (__pyx_v_self->_controller != 0); if (__pyx_t_1) { - /* "pygame/_sdl2/controller.pyx":140 + /* "pygame/_sdl2/controller.pyx":141 * def quit(self): * if self._controller: * SDL_GameControllerClose(self._controller) # <<<<<<<<<<<<<< @@ -3663,7 +3663,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_10quit(struct */ SDL_GameControllerClose(__pyx_v_self->_controller); - /* "pygame/_sdl2/controller.pyx":141 + /* "pygame/_sdl2/controller.pyx":142 * if self._controller: * SDL_GameControllerClose(self._controller) * self._controller = NULL # <<<<<<<<<<<<<< @@ -3672,7 +3672,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_10quit(struct */ __pyx_v_self->_controller = NULL; - /* "pygame/_sdl2/controller.pyx":139 + /* "pygame/_sdl2/controller.pyx":140 * * def quit(self): * if self._controller: # <<<<<<<<<<<<<< @@ -3681,7 +3681,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_10quit(struct */ } - /* "pygame/_sdl2/controller.pyx":138 + /* "pygame/_sdl2/controller.pyx":139 * return not self._controller == NULL * * def quit(self): # <<<<<<<<<<<<<< @@ -3696,7 +3696,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_10quit(struct return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":144 +/* "pygame/_sdl2/controller.pyx":145 * * @staticmethod * def from_joystick(joy): # <<<<<<<<<<<<<< @@ -3735,7 +3735,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_13from_joysti else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_joystick") < 0)) __PYX_ERR(0, 144, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_joystick") < 0)) __PYX_ERR(0, 145, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -3746,7 +3746,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_13from_joysti } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_joystick", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 144, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_joystick", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 145, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.controller.Controller.from_joystick", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3774,7 +3774,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joysti int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_joystick", 0); - /* "pygame/_sdl2/controller.pyx":149 + /* "pygame/_sdl2/controller.pyx":150 * """ * # https://wiki.libsdl.org/SDL_GameControllerFromInstanceID * JOYSTICK_INIT_CHECK() # <<<<<<<<<<<<<< @@ -3783,7 +3783,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joysti */ JOYSTICK_INIT_CHECK(); - /* "pygame/_sdl2/controller.pyx":150 + /* "pygame/_sdl2/controller.pyx":151 * # https://wiki.libsdl.org/SDL_GameControllerFromInstanceID * JOYSTICK_INIT_CHECK() * if not pgJoystick_Check(joy): # <<<<<<<<<<<<<< @@ -3793,20 +3793,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joysti __pyx_t_1 = ((!(pgJoystick_Check(__pyx_v_joy) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "pygame/_sdl2/controller.pyx":151 + /* "pygame/_sdl2/controller.pyx":152 * JOYSTICK_INIT_CHECK() * if not pgJoystick_Check(joy): * raise TypeError('should be a pygame.joystick.Joystick object.') # <<<<<<<<<<<<<< * * cdef Controller self = Controller.__new__(Controller) */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 151, __pyx_L1_error) + __PYX_ERR(0, 152, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":150 + /* "pygame/_sdl2/controller.pyx":151 * # https://wiki.libsdl.org/SDL_GameControllerFromInstanceID * JOYSTICK_INIT_CHECK() * if not pgJoystick_Check(joy): # <<<<<<<<<<<<<< @@ -3815,28 +3815,28 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joysti */ } - /* "pygame/_sdl2/controller.pyx":153 + /* "pygame/_sdl2/controller.pyx":154 * raise TypeError('should be a pygame.joystick.Joystick object.') * * cdef Controller self = Controller.__new__(Controller) # <<<<<<<<<<<<<< * self.__init__(joy.get_id()) * return self */ - __pyx_t_2 = ((PyObject *)__pyx_tp_new_6pygame_5_sdl2_10controller_Controller(((PyTypeObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_tp_new_6pygame_5_sdl2_10controller_Controller(((PyTypeObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_v_self = ((struct __pyx_obj_6pygame_5_sdl2_10controller_Controller *)__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":154 + /* "pygame/_sdl2/controller.pyx":155 * * cdef Controller self = Controller.__new__(Controller) * self.__init__(joy.get_id()) # <<<<<<<<<<<<<< * return self * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_joy, __pyx_n_s_get_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 154, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_joy, __pyx_n_s_get_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -3850,7 +3850,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joysti } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -3866,12 +3866,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joysti __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":155 + /* "pygame/_sdl2/controller.pyx":156 * cdef Controller self = Controller.__new__(Controller) * self.__init__(joy.get_id()) * return self # <<<<<<<<<<<<<< @@ -3883,7 +3883,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joysti __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":144 + /* "pygame/_sdl2/controller.pyx":145 * * @staticmethod * def from_joystick(joy): # <<<<<<<<<<<<<< @@ -3907,7 +3907,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_12from_joysti return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":158 +/* "pygame/_sdl2/controller.pyx":159 * * @property * def id(self): # <<<<<<<<<<<<<< @@ -3937,7 +3937,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_2id___get__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/controller.pyx":159 + /* "pygame/_sdl2/controller.pyx":160 * @property * def id(self): * return self._index # <<<<<<<<<<<<<< @@ -3945,13 +3945,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_2id___get__(s * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":158 + /* "pygame/_sdl2/controller.pyx":159 * * @property * def id(self): # <<<<<<<<<<<<<< @@ -3970,7 +3970,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_2id___get__(s return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":162 +/* "pygame/_sdl2/controller.pyx":163 * * @property * def name(self): # <<<<<<<<<<<<<< @@ -4003,14 +4003,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4name___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "pygame/_sdl2/controller.pyx":164 + /* "pygame/_sdl2/controller.pyx":165 * def name(self): * # https://wiki.libsdl.org/SDL_GameControllerName * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * return SDL_GameControllerName(self._controller).decode('utf-8') */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -4024,19 +4024,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4name___get__ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":165 + /* "pygame/_sdl2/controller.pyx":166 * # https://wiki.libsdl.org/SDL_GameControllerName * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * return SDL_GameControllerName(self._controller).decode('utf-8') * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4050,12 +4050,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4name___get__ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":166 + /* "pygame/_sdl2/controller.pyx":167 * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() * return SDL_GameControllerName(self._controller).decode('utf-8') # <<<<<<<<<<<<<< @@ -4064,14 +4064,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4name___get__ */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = SDL_GameControllerName(__pyx_v_self->_controller); - __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_t_4, 0, strlen(__pyx_t_4), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_r = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":162 + /* "pygame/_sdl2/controller.pyx":163 * * @property * def name(self): # <<<<<<<<<<<<<< @@ -4092,7 +4092,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_4name___get__ return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":168 +/* "pygame/_sdl2/controller.pyx":169 * return SDL_GameControllerName(self._controller).decode('utf-8') * * def attached(self): # <<<<<<<<<<<<<< @@ -4124,14 +4124,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_14attached(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("attached", 0); - /* "pygame/_sdl2/controller.pyx":170 + /* "pygame/_sdl2/controller.pyx":171 * def attached(self): * # https://wiki.libsdl.org/SDL_GameControllerGetAttached * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * return SDL_GameControllerGetAttached(self._controller) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -4145,19 +4145,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_14attached(st } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":171 + /* "pygame/_sdl2/controller.pyx":172 * # https://wiki.libsdl.org/SDL_GameControllerGetAttached * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * return SDL_GameControllerGetAttached(self._controller) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4171,12 +4171,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_14attached(st } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":172 + /* "pygame/_sdl2/controller.pyx":173 * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() * return SDL_GameControllerGetAttached(self._controller) # <<<<<<<<<<<<<< @@ -4184,13 +4184,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_14attached(st * def as_joystick(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_SDL_bool(SDL_GameControllerGetAttached(__pyx_v_self->_controller)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_SDL_bool(SDL_GameControllerGetAttached(__pyx_v_self->_controller)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":168 + /* "pygame/_sdl2/controller.pyx":169 * return SDL_GameControllerName(self._controller).decode('utf-8') * * def attached(self): # <<<<<<<<<<<<<< @@ -4211,7 +4211,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_14attached(st return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":174 +/* "pygame/_sdl2/controller.pyx":175 * return SDL_GameControllerGetAttached(self._controller) * * def as_joystick(self): # <<<<<<<<<<<<<< @@ -4244,7 +4244,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_16as_joystick int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_joystick", 0); - /* "pygame/_sdl2/controller.pyx":176 + /* "pygame/_sdl2/controller.pyx":177 * def as_joystick(self): * # create a pygame.joystick.Joystick() object by using index. * JOYSTICK_INIT_CHECK() # <<<<<<<<<<<<<< @@ -4253,14 +4253,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_16as_joystick */ JOYSTICK_INIT_CHECK(); - /* "pygame/_sdl2/controller.pyx":177 + /* "pygame/_sdl2/controller.pyx":178 * # create a pygame.joystick.Joystick() object by using index. * JOYSTICK_INIT_CHECK() * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * joy = pgJoystick_New(self._index) * return joy */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -4274,24 +4274,24 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_16as_joystick } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":178 + /* "pygame/_sdl2/controller.pyx":179 * JOYSTICK_INIT_CHECK() * GAMECONTROLLER_INIT_CHECK() * joy = pgJoystick_New(self._index) # <<<<<<<<<<<<<< * return joy * */ - __pyx_t_1 = pgJoystick_New(__pyx_v_self->_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_1 = pgJoystick_New(__pyx_v_self->_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_joy = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":179 + /* "pygame/_sdl2/controller.pyx":180 * GAMECONTROLLER_INIT_CHECK() * joy = pgJoystick_New(self._index) * return joy # <<<<<<<<<<<<<< @@ -4303,7 +4303,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_16as_joystick __pyx_r = __pyx_v_joy; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":174 + /* "pygame/_sdl2/controller.pyx":175 * return SDL_GameControllerGetAttached(self._controller) * * def as_joystick(self): # <<<<<<<<<<<<<< @@ -4325,7 +4325,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_16as_joystick return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":181 +/* "pygame/_sdl2/controller.pyx":182 * return joy * * def get_axis(self, SDL_GameControllerAxis axis): # <<<<<<<<<<<<<< @@ -4344,7 +4344,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_19get_axis(Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_axis (wrapper)", 0); assert(__pyx_arg_axis); { - __pyx_v_axis = ((SDL_GameControllerAxis)__Pyx_PyInt_As_SDL_GameControllerAxis(__pyx_arg_axis)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L3_error) + __pyx_v_axis = ((SDL_GameControllerAxis)__Pyx_PyInt_As_SDL_GameControllerAxis(__pyx_arg_axis)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -4370,14 +4370,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_18get_axis(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_axis", 0); - /* "pygame/_sdl2/controller.pyx":183 + /* "pygame/_sdl2/controller.pyx":184 * def get_axis(self, SDL_GameControllerAxis axis): * # https://wiki.libsdl.org/SDL_GameControllerGetAxis * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * return SDL_GameControllerGetAxis(self._controller, axis) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -4391,19 +4391,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_18get_axis(st } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":184 + /* "pygame/_sdl2/controller.pyx":185 * # https://wiki.libsdl.org/SDL_GameControllerGetAxis * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * return SDL_GameControllerGetAxis(self._controller, axis) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4417,12 +4417,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_18get_axis(st } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":185 + /* "pygame/_sdl2/controller.pyx":186 * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() * return SDL_GameControllerGetAxis(self._controller, axis) # <<<<<<<<<<<<<< @@ -4430,13 +4430,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_18get_axis(st * def get_button(self, SDL_GameControllerButton button): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_Sint16(SDL_GameControllerGetAxis(__pyx_v_self->_controller, __pyx_v_axis)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_Sint16(SDL_GameControllerGetAxis(__pyx_v_self->_controller, __pyx_v_axis)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":181 + /* "pygame/_sdl2/controller.pyx":182 * return joy * * def get_axis(self, SDL_GameControllerAxis axis): # <<<<<<<<<<<<<< @@ -4457,7 +4457,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_18get_axis(st return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":187 +/* "pygame/_sdl2/controller.pyx":188 * return SDL_GameControllerGetAxis(self._controller, axis) * * def get_button(self, SDL_GameControllerButton button): # <<<<<<<<<<<<<< @@ -4476,7 +4476,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_21get_button( __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_button (wrapper)", 0); assert(__pyx_arg_button); { - __pyx_v_button = ((SDL_GameControllerButton)__Pyx_PyInt_As_SDL_GameControllerButton(__pyx_arg_button)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 187, __pyx_L3_error) + __pyx_v_button = ((SDL_GameControllerButton)__Pyx_PyInt_As_SDL_GameControllerButton(__pyx_arg_button)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -4502,14 +4502,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_20get_button( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_button", 0); - /* "pygame/_sdl2/controller.pyx":189 + /* "pygame/_sdl2/controller.pyx":190 * def get_button(self, SDL_GameControllerButton button): * # https://wiki.libsdl.org/SDL_GameControllerGetButton * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * return SDL_GameControllerGetButton(self._controller, button) == 1 */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -4523,19 +4523,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_20get_button( } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":190 + /* "pygame/_sdl2/controller.pyx":191 * # https://wiki.libsdl.org/SDL_GameControllerGetButton * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * return SDL_GameControllerGetButton(self._controller, button) == 1 * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4549,12 +4549,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_20get_button( } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":191 + /* "pygame/_sdl2/controller.pyx":192 * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() * return SDL_GameControllerGetButton(self._controller, button) == 1 # <<<<<<<<<<<<<< @@ -4562,13 +4562,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_20get_button( * def get_mapping(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_GameControllerGetButton(__pyx_v_self->_controller, __pyx_v_button) == 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((SDL_GameControllerGetButton(__pyx_v_self->_controller, __pyx_v_button) == 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":187 + /* "pygame/_sdl2/controller.pyx":188 * return SDL_GameControllerGetAxis(self._controller, axis) * * def get_button(self, SDL_GameControllerButton button): # <<<<<<<<<<<<<< @@ -4589,7 +4589,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_20get_button( return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":193 +/* "pygame/_sdl2/controller.pyx":194 * return SDL_GameControllerGetButton(self._controller, button) == 1 * * def get_mapping(self): # <<<<<<<<<<<<<< @@ -4631,14 +4631,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_mapping", 0); - /* "pygame/_sdl2/controller.pyx":196 + /* "pygame/_sdl2/controller.pyx":197 * #https://wiki.libsdl.org/SDL_GameControllerMapping * # TODO: mapping should be a readable dict instead of a string. * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * raw_mapping = SDL_GameControllerMapping(self._controller) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -4652,19 +4652,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":197 + /* "pygame/_sdl2/controller.pyx":198 * # TODO: mapping should be a readable dict instead of a string. * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * raw_mapping = SDL_GameControllerMapping(self._controller) * mapping = raw_mapping.decode('utf-8') */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4678,12 +4678,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":198 + /* "pygame/_sdl2/controller.pyx":199 * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() * raw_mapping = SDL_GameControllerMapping(self._controller) # <<<<<<<<<<<<<< @@ -4692,19 +4692,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping */ __pyx_v_raw_mapping = SDL_GameControllerMapping(__pyx_v_self->_controller); - /* "pygame/_sdl2/controller.pyx":199 + /* "pygame/_sdl2/controller.pyx":200 * self._CLOSEDCHECK() * raw_mapping = SDL_GameControllerMapping(self._controller) * mapping = raw_mapping.decode('utf-8') # <<<<<<<<<<<<<< * SDL_free(raw_mapping) * */ - __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_raw_mapping, 0, strlen(__pyx_v_raw_mapping), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_raw_mapping, 0, strlen(__pyx_v_raw_mapping), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mapping = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":200 + /* "pygame/_sdl2/controller.pyx":201 * raw_mapping = SDL_GameControllerMapping(self._controller) * mapping = raw_mapping.decode('utf-8') * SDL_free(raw_mapping) # <<<<<<<<<<<<<< @@ -4713,14 +4713,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping */ SDL_free(__pyx_v_raw_mapping); - /* "pygame/_sdl2/controller.pyx":203 + /* "pygame/_sdl2/controller.pyx":204 * * # split mapping, cut off guid, name and last (empty) comma * mapping = mapping.split(",")[2:-1] # <<<<<<<<<<<<<< * keys = [] * values = [] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mapping, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mapping, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4734,40 +4734,40 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s__2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s__2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 2, -1L, NULL, NULL, &__pyx_slice__3, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 2, -1L, NULL, NULL, &__pyx_slice__3, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_mapping, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":204 + /* "pygame/_sdl2/controller.pyx":205 * # split mapping, cut off guid, name and last (empty) comma * mapping = mapping.split(",")[2:-1] * keys = [] # <<<<<<<<<<<<<< * values = [] * */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_keys = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":205 + /* "pygame/_sdl2/controller.pyx":206 * mapping = mapping.split(",")[2:-1] * keys = [] * values = [] # <<<<<<<<<<<<<< * * for obj in mapping: */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_values = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":207 + /* "pygame/_sdl2/controller.pyx":208 * values = [] * * for obj in mapping: # <<<<<<<<<<<<<< @@ -4778,26 +4778,26 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping __pyx_t_2 = __pyx_v_mapping; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_mapping); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_mapping); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 208, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 208, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -4807,7 +4807,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 207, __pyx_L1_error) + else __PYX_ERR(0, 208, __pyx_L1_error) } break; } @@ -4816,14 +4816,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":208 + /* "pygame/_sdl2/controller.pyx":209 * * for obj in mapping: * a = obj.split(':') # <<<<<<<<<<<<<< * keys.append(a[0]) * values.append(a[1]) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -4837,37 +4837,37 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_kp_s__4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s__4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":209 + /* "pygame/_sdl2/controller.pyx":210 * for obj in mapping: * a = obj.split(':') * keys.append(a[0]) # <<<<<<<<<<<<<< * values.append(a[1]) * */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_keys, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_keys, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":210 + /* "pygame/_sdl2/controller.pyx":211 * a = obj.split(':') * keys.append(a[0]) * values.append(a[1]) # <<<<<<<<<<<<<< * * #create and return the dict */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":207 + /* "pygame/_sdl2/controller.pyx":208 * values = [] * * for obj in mapping: # <<<<<<<<<<<<<< @@ -4877,14 +4877,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":213 + /* "pygame/_sdl2/controller.pyx":214 * * #create and return the dict * mapping = dict(zip(keys, values)) # <<<<<<<<<<<<<< * return mapping * */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_keys); __Pyx_GIVEREF(__pyx_v_keys); @@ -4892,16 +4892,16 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping __Pyx_INCREF(__pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_values); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_mapping, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":214 + /* "pygame/_sdl2/controller.pyx":215 * #create and return the dict * mapping = dict(zip(keys, values)) * return mapping # <<<<<<<<<<<<<< @@ -4913,7 +4913,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping __pyx_r = __pyx_v_mapping; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":193 + /* "pygame/_sdl2/controller.pyx":194 * return SDL_GameControllerGetButton(self._controller, button) == 1 * * def get_mapping(self): # <<<<<<<<<<<<<< @@ -4940,7 +4940,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_22get_mapping return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":216 +/* "pygame/_sdl2/controller.pyx":217 * return mapping * * def set_mapping(self, mapping): # <<<<<<<<<<<<<< @@ -4989,14 +4989,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_mapping", 0); - /* "pygame/_sdl2/controller.pyx":219 + /* "pygame/_sdl2/controller.pyx":220 * # https://wiki.libsdl.org/SDL_GameControllerAddMapping * # TODO: mapping should be a readable dict instead of a string. * GAMECONTROLLER_INIT_CHECK() # <<<<<<<<<<<<<< * self._CLOSEDCHECK() * cdef SDL_Joystick *joy */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_GAMECONTROLLER_INIT_CHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -5010,19 +5010,19 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":220 + /* "pygame/_sdl2/controller.pyx":221 * # TODO: mapping should be a readable dict instead of a string. * GAMECONTROLLER_INIT_CHECK() * self._CLOSEDCHECK() # <<<<<<<<<<<<<< * cdef SDL_Joystick *joy * cdef SDL_JoystickGUID guid */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5036,12 +5036,12 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":225 + /* "pygame/_sdl2/controller.pyx":226 * cdef char[64] pszGUID * * joy = SDL_GameControllerGetJoystick(self._controller) # <<<<<<<<<<<<<< @@ -5050,7 +5050,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping */ __pyx_v_joy = SDL_GameControllerGetJoystick(__pyx_v_self->_controller); - /* "pygame/_sdl2/controller.pyx":226 + /* "pygame/_sdl2/controller.pyx":227 * * joy = SDL_GameControllerGetJoystick(self._controller) * guid = SDL_JoystickGetGUID(joy) # <<<<<<<<<<<<<< @@ -5059,7 +5059,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping */ __pyx_v_guid = SDL_JoystickGetGUID(__pyx_v_joy); - /* "pygame/_sdl2/controller.pyx":227 + /* "pygame/_sdl2/controller.pyx":228 * joy = SDL_GameControllerGetJoystick(self._controller) * guid = SDL_JoystickGetGUID(joy) * name = SDL_GameControllerName(self._controller) # <<<<<<<<<<<<<< @@ -5068,7 +5068,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping */ __pyx_v_name = SDL_GameControllerName(__pyx_v_self->_controller); - /* "pygame/_sdl2/controller.pyx":228 + /* "pygame/_sdl2/controller.pyx":229 * guid = SDL_JoystickGetGUID(joy) * name = SDL_GameControllerName(self._controller) * SDL_JoystickGetGUIDString(guid, pszGUID, 63) # <<<<<<<<<<<<<< @@ -5077,7 +5077,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping */ SDL_JoystickGetGUIDString(__pyx_v_guid, __pyx_v_pszGUID, 63); - /* "pygame/_sdl2/controller.pyx":230 + /* "pygame/_sdl2/controller.pyx":231 * SDL_JoystickGetGUIDString(guid, pszGUID, 63) * * str_map = "" # <<<<<<<<<<<<<< @@ -5087,14 +5087,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping __Pyx_INCREF(__pyx_kp_s__5); __pyx_v_str_map = __pyx_kp_s__5; - /* "pygame/_sdl2/controller.pyx":231 + /* "pygame/_sdl2/controller.pyx":232 * * str_map = "" * for key, value in mapping.items(): # <<<<<<<<<<<<<< * str_map += "{}:{},".format(key, value) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mapping, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mapping, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5108,16 +5108,16 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -5125,17 +5125,17 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 232, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 232, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -5145,7 +5145,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 231, __pyx_L1_error) + else __PYX_ERR(0, 232, __pyx_L1_error) } break; } @@ -5157,7 +5157,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 231, __pyx_L1_error) + __PYX_ERR(0, 232, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -5170,15 +5170,15 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -5186,7 +5186,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 231, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 232, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -5194,7 +5194,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 231, __pyx_L1_error) + __PYX_ERR(0, 232, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3); @@ -5202,14 +5202,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "pygame/_sdl2/controller.pyx":232 + /* "pygame/_sdl2/controller.pyx":233 * str_map = "" * for key, value in mapping.items(): * str_map += "{}:{},".format(key, value) # <<<<<<<<<<<<<< * * mapstring = b"%s,%s,%s" % (pszGUID, name, str_map.encode('utf-8')) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s__6, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s__6, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = NULL; __pyx_t_9 = 0; @@ -5226,7 +5226,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_key, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -5234,13 +5234,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_key, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -5251,18 +5251,18 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_v_value); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_str_map, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_str_map, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_str_map, __pyx_t_6); __pyx_t_6 = 0; - /* "pygame/_sdl2/controller.pyx":231 + /* "pygame/_sdl2/controller.pyx":232 * * str_map = "" * for key, value in mapping.items(): # <<<<<<<<<<<<<< @@ -5272,18 +5272,18 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":234 + /* "pygame/_sdl2/controller.pyx":235 * str_map += "{}:{},".format(key, value) * * mapstring = b"%s,%s,%s" % (pszGUID, name, str_map.encode('utf-8')) # <<<<<<<<<<<<<< * res = SDL_GameControllerAddMapping(mapstring) * if res < 0: */ - __pyx_t_2 = __Pyx_PyObject_FromString(__pyx_v_pszGUID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FromString(__pyx_v_pszGUID); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_str_map, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_str_map, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -5297,10 +5297,10 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s_utf_8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); @@ -5311,23 +5311,23 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Remainder(__pyx_kp_b_s_s_s, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_1 = PyNumber_Remainder(__pyx_kp_b_s_s_s, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_mapstring = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":235 + /* "pygame/_sdl2/controller.pyx":236 * * mapstring = b"%s,%s,%s" % (pszGUID, name, str_map.encode('utf-8')) * res = SDL_GameControllerAddMapping(mapstring) # <<<<<<<<<<<<<< * if res < 0: * raise error() */ - __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_mapstring); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_mapstring); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 236, __pyx_L1_error) __pyx_v_res = SDL_GameControllerAddMapping(__pyx_t_10); - /* "pygame/_sdl2/controller.pyx":236 + /* "pygame/_sdl2/controller.pyx":237 * mapstring = b"%s,%s,%s" % (pszGUID, name, str_map.encode('utf-8')) * res = SDL_GameControllerAddMapping(mapstring) * if res < 0: # <<<<<<<<<<<<<< @@ -5337,14 +5337,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping __pyx_t_11 = ((__pyx_v_res < 0) != 0); if (unlikely(__pyx_t_11)) { - /* "pygame/_sdl2/controller.pyx":237 + /* "pygame/_sdl2/controller.pyx":238 * res = SDL_GameControllerAddMapping(mapstring) * if res < 0: * raise error() # <<<<<<<<<<<<<< * * return res */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { @@ -5358,14 +5358,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 237, __pyx_L1_error) + __PYX_ERR(0, 238, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":236 + /* "pygame/_sdl2/controller.pyx":237 * mapstring = b"%s,%s,%s" % (pszGUID, name, str_map.encode('utf-8')) * res = SDL_GameControllerAddMapping(mapstring) * if res < 0: # <<<<<<<<<<<<<< @@ -5374,7 +5374,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping */ } - /* "pygame/_sdl2/controller.pyx":239 + /* "pygame/_sdl2/controller.pyx":240 * raise error() * * return res # <<<<<<<<<<<<<< @@ -5382,13 +5382,13 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping * def rumble(self, low_frequency, high_frequency, duration): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_res); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_res); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":216 + /* "pygame/_sdl2/controller.pyx":217 * return mapping * * def set_mapping(self, mapping): # <<<<<<<<<<<<<< @@ -5415,16 +5415,17 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_24set_mapping return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":241 +/* "pygame/_sdl2/controller.pyx":242 * return res * * def rumble(self, low_frequency, high_frequency, duration): # <<<<<<<<<<<<<< - * self._CLOSEDCHECK() - * duration = max(duration, 0) + * """ + * Play a rumble effect on the controller, with set power (0-1 range) and */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_27rumble(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_10controller_10Controller_26rumble[] = "\n Play a rumble effect on the controller, with set power (0-1 range) and\n duration (in ms). Returns True if the effect was played successfully,\n False otherwise.\n "; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_27rumble(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_low_frequency = 0; PyObject *__pyx_v_high_frequency = 0; @@ -5460,17 +5461,17 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_27rumble(PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_high_frequency)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("rumble", 1, 3, 3, 1); __PYX_ERR(0, 241, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("rumble", 1, 3, 3, 1); __PYX_ERR(0, 242, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_duration)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("rumble", 1, 3, 3, 2); __PYX_ERR(0, 241, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("rumble", 1, 3, 3, 2); __PYX_ERR(0, 242, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rumble") < 0)) __PYX_ERR(0, 241, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rumble") < 0)) __PYX_ERR(0, 242, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -5485,7 +5486,7 @@ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_27rumble(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("rumble", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 241, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("rumble", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 242, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sdl2.controller.Controller.rumble", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5507,9 +5508,9 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - long __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + int __pyx_t_4; + long __pyx_t_5; + PyObject *__pyx_t_6 = NULL; double __pyx_t_7; double __pyx_t_8; Uint16 __pyx_t_9; @@ -5521,14 +5522,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru __Pyx_RefNannySetupContext("rumble", 0); __Pyx_INCREF(__pyx_v_duration); - /* "pygame/_sdl2/controller.pyx":242 - * - * def rumble(self, low_frequency, high_frequency, duration): + /* "pygame/_sdl2/controller.pyx":248 + * False otherwise. + * """ * self._CLOSEDCHECK() # <<<<<<<<<<<<<< - * duration = max(duration, 0) - * low = min(max(low_frequency, 0.0), 1.0) + * if not SDL_VERSION_ATLEAST(2, 0, 9): + * return False */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5542,32 +5543,63 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":243 - * def rumble(self, low_frequency, high_frequency, duration): + /* "pygame/_sdl2/controller.pyx":249 + * """ + * self._CLOSEDCHECK() + * if not SDL_VERSION_ATLEAST(2, 0, 9): # <<<<<<<<<<<<<< + * return False + * + */ + __pyx_t_4 = ((!(SDL_VERSION_ATLEAST(2, 0, 9) != 0)) != 0); + if (__pyx_t_4) { + + /* "pygame/_sdl2/controller.pyx":250 * self._CLOSEDCHECK() + * if not SDL_VERSION_ATLEAST(2, 0, 9): + * return False # <<<<<<<<<<<<<< + * + * duration = max(duration, 0) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "pygame/_sdl2/controller.pyx":249 + * """ + * self._CLOSEDCHECK() + * if not SDL_VERSION_ATLEAST(2, 0, 9): # <<<<<<<<<<<<<< + * return False + * + */ + } + + /* "pygame/_sdl2/controller.pyx":252 + * return False + * * duration = max(duration, 0) # <<<<<<<<<<<<<< * low = min(max(low_frequency, 0.0), 1.0) * high = min(max(high_frequency, 0.0), 1.0) */ - __pyx_t_4 = 0; + __pyx_t_5 = 0; __Pyx_INCREF(__pyx_v_duration); __pyx_t_1 = __pyx_v_duration; - __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 243, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_6) { - __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_4) { + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; @@ -5579,8 +5611,8 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru __Pyx_DECREF_SET(__pyx_v_duration, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":244 - * self._CLOSEDCHECK() + /* "pygame/_sdl2/controller.pyx":253 + * * duration = max(duration, 0) * low = min(max(low_frequency, 0.0), 1.0) # <<<<<<<<<<<<<< * high = min(max(high_frequency, 0.0), 1.0) @@ -5590,14 +5622,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru __pyx_t_8 = 0.0; __Pyx_INCREF(__pyx_v_low_frequency); __pyx_t_1 = __pyx_v_low_frequency; - __pyx_t_5 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - __pyx_t_3 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) + if (__pyx_t_4) { + __pyx_t_3 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; @@ -5609,17 +5641,17 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 244, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_6) { - __pyx_t_5 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_4) { + __pyx_t_6 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; @@ -5631,7 +5663,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru __pyx_v_low = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":245 + /* "pygame/_sdl2/controller.pyx":254 * duration = max(duration, 0) * low = min(max(low_frequency, 0.0), 1.0) * high = min(max(high_frequency, 0.0), 1.0) # <<<<<<<<<<<<<< @@ -5642,14 +5674,14 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru __pyx_t_8 = 0.0; __Pyx_INCREF(__pyx_v_high_frequency); __pyx_t_1 = __pyx_v_high_frequency; - __pyx_t_5 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_6) { - __pyx_t_3 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + if (__pyx_t_4) { + __pyx_t_3 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; @@ -5661,17 +5693,17 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 245, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_6) { - __pyx_t_5 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_4) { + __pyx_t_6 = PyFloat_FromDouble(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; @@ -5683,25 +5715,25 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru __pyx_v_high = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":247 + /* "pygame/_sdl2/controller.pyx":256 * high = min(max(high_frequency, 0.0), 1.0) * * res = SDL_GameControllerRumble(self._controller, low * 0xFFFF, high * 0xFFFF, duration) # <<<<<<<<<<<<<< * return bool(res) * */ - __pyx_t_1 = PyNumber_Multiply(__pyx_v_low, __pyx_int_65535); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_low, __pyx_int_65535); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyInt_As_Uint16(__pyx_t_1); if (unlikely((__pyx_t_9 == ((Uint16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_Uint16(__pyx_t_1); if (unlikely((__pyx_t_9 == ((Uint16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Multiply(__pyx_v_high, __pyx_int_65535); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_high, __pyx_int_65535); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyInt_As_Uint16(__pyx_t_1); if (unlikely((__pyx_t_10 == ((Uint16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_Uint16(__pyx_t_1); if (unlikely((__pyx_t_10 == ((Uint16)-1)) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyInt_As_Uint32(__pyx_v_duration); if (unlikely((__pyx_t_11 == ((Uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_As_Uint32(__pyx_v_duration); if (unlikely((__pyx_t_11 == ((Uint32)-1)) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error) __pyx_v_res = SDL_GameControllerRumble(__pyx_v_self->_controller, __pyx_t_9, __pyx_t_10, __pyx_t_11); - /* "pygame/_sdl2/controller.pyx":248 + /* "pygame/_sdl2/controller.pyx":257 * * res = SDL_GameControllerRumble(self._controller, low * 0xFFFF, high * 0xFFFF, duration) * return bool(res) # <<<<<<<<<<<<<< @@ -5709,22 +5741,22 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru * def stop_rumble(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_res); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_res); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_6))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sdl2/controller.pyx":241 + /* "pygame/_sdl2/controller.pyx":242 * return res * * def rumble(self, low_frequency, high_frequency, duration): # <<<<<<<<<<<<<< - * self._CLOSEDCHECK() - * duration = max(duration, 0) + * """ + * Play a rumble effect on the controller, with set power (0-1 range) and */ /* function exit code */ @@ -5732,7 +5764,7 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pygame._sdl2.controller.Controller.rumble", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -5744,16 +5776,17 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_26rumble(stru return __pyx_r; } -/* "pygame/_sdl2/controller.pyx":250 +/* "pygame/_sdl2/controller.pyx":259 * return bool(res) * * def stop_rumble(self): # <<<<<<<<<<<<<< - * self._CLOSEDCHECK() - * SDL_GameControllerRumble(self._controller, 0, 0, 1) + * """ + * Stop any rumble effect playing on the controller. */ /* Python wrapper */ static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_29stop_rumble(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_6pygame_5_sdl2_10controller_10Controller_28stop_rumble[] = "\n Stop any rumble effect playing on the controller.\n "; static PyObject *__pyx_pw_6pygame_5_sdl2_10controller_10Controller_29stop_rumble(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -5771,18 +5804,20 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_28stop_rumble PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("stop_rumble", 0); - /* "pygame/_sdl2/controller.pyx":251 - * - * def stop_rumble(self): + /* "pygame/_sdl2/controller.pyx":263 + * Stop any rumble effect playing on the controller. + * """ * self._CLOSEDCHECK() # <<<<<<<<<<<<<< - * SDL_GameControllerRumble(self._controller, 0, 0, 1) + * if SDL_VERSION_ATLEAST(2, 0, 9): + * SDL_GameControllerRumble(self._controller, 0, 0, 1) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CLOSEDCHECK); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5796,24 +5831,41 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_10controller_10Controller_28stop_rumble } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sdl2/controller.pyx":252 - * def stop_rumble(self): + /* "pygame/_sdl2/controller.pyx":264 + * """ + * self._CLOSEDCHECK() + * if SDL_VERSION_ATLEAST(2, 0, 9): # <<<<<<<<<<<<<< + * SDL_GameControllerRumble(self._controller, 0, 0, 1) + */ + __pyx_t_4 = (SDL_VERSION_ATLEAST(2, 0, 9) != 0); + if (__pyx_t_4) { + + /* "pygame/_sdl2/controller.pyx":265 * self._CLOSEDCHECK() - * SDL_GameControllerRumble(self._controller, 0, 0, 1) # <<<<<<<<<<<<<< + * if SDL_VERSION_ATLEAST(2, 0, 9): + * SDL_GameControllerRumble(self._controller, 0, 0, 1) # <<<<<<<<<<<<<< */ - (void)(SDL_GameControllerRumble(__pyx_v_self->_controller, 0, 0, 1)); + (void)(SDL_GameControllerRumble(__pyx_v_self->_controller, 0, 0, 1)); - /* "pygame/_sdl2/controller.pyx":250 + /* "pygame/_sdl2/controller.pyx":264 + * """ + * self._CLOSEDCHECK() + * if SDL_VERSION_ATLEAST(2, 0, 9): # <<<<<<<<<<<<<< + * SDL_GameControllerRumble(self._controller, 0, 0, 1) + */ + } + + /* "pygame/_sdl2/controller.pyx":259 * return bool(res) * * def stop_rumble(self): # <<<<<<<<<<<<<< - * self._CLOSEDCHECK() - * SDL_GameControllerRumble(self._controller, 0, 0, 1) + * """ + * Stop any rumble effect playing on the controller. */ /* function exit code */ @@ -5992,8 +6044,8 @@ static PyMethodDef __pyx_methods_6pygame_5_sdl2_10controller_Controller[] = { {"get_button", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_21get_button, METH_O, 0}, {"get_mapping", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_23get_mapping, METH_NOARGS, 0}, {"set_mapping", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_25set_mapping, METH_O, 0}, - {"rumble", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_27rumble, METH_VARARGS|METH_KEYWORDS, 0}, - {"stop_rumble", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_29stop_rumble, METH_NOARGS, 0}, + {"rumble", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_27rumble, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6pygame_5_sdl2_10controller_10Controller_26rumble}, + {"stop_rumble", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_29stop_rumble, METH_NOARGS, __pyx_doc_6pygame_5_sdl2_10controller_10Controller_28stop_rumble}, {"__reduce_cython__", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_31__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_6pygame_5_sdl2_10controller_10Controller_33__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} @@ -6187,10 +6239,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 143, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 123, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 151, __pyx_L1_error) - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 214, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -6200,25 +6252,25 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "pygame/_sdl2/controller.pyx":151 + /* "pygame/_sdl2/controller.pyx":152 * JOYSTICK_INIT_CHECK() * if not pgJoystick_Check(joy): * raise TypeError('should be a pygame.joystick.Joystick object.') # <<<<<<<<<<<<<< * * cdef Controller self = Controller.__new__(Controller) */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_should_be_a_pygame_joystick_Joys); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_should_be_a_pygame_joystick_Joys); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "pygame/_sdl2/controller.pyx":203 + /* "pygame/_sdl2/controller.pyx":204 * * # split mapping, cut off guid, name and last (empty) comma * mapping = mapping.split(",")[2:-1] # <<<<<<<<<<<<<< * keys = [] * values = [] */ - __pyx_slice__3 = PySlice_New(__pyx_int_2, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_slice__3 = PySlice_New(__pyx_int_2, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__3); __Pyx_GIVEREF(__pyx_slice__3); @@ -6241,131 +6293,131 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "pygame/_sdl2/controller.pyx":15 + /* "pygame/_sdl2/controller.pyx":16 * import_pygame_joystick() * * def GAMECONTROLLER_INIT_CHECK(): # <<<<<<<<<<<<<< * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * raise error("gamecontroller system not initialized") */ - __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_GAMECONTROLLER_INIT_CHECK, 15, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_GAMECONTROLLER_INIT_CHECK, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 16, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":40 + /* "pygame/_sdl2/controller.pyx":41 * # not automatically initialize controller at this moment. * * def __PYGAMEinit__(**kwargs): # <<<<<<<<<<<<<< * _controller_autoinit() * */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_PYGAMEinit, 40, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_PYGAMEinit, 41, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 41, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":43 + /* "pygame/_sdl2/controller.pyx":44 * _controller_autoinit() * * def init(): # <<<<<<<<<<<<<< * if not _controller_autoinit(): * raise error() */ - __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_init_2, 43, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_init_2, 44, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 44, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":47 + /* "pygame/_sdl2/controller.pyx":48 * raise error() * * def get_init(): # <<<<<<<<<<<<<< * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * */ - __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_init, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_init, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 48, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":50 + /* "pygame/_sdl2/controller.pyx":51 * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * * def quit(): # <<<<<<<<<<<<<< * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) */ - __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_quit, 50, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_quit, 51, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 51, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":54 + /* "pygame/_sdl2/controller.pyx":55 * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * * def set_eventstate(state): # <<<<<<<<<<<<<< * GAMECONTROLLER_INIT_CHECK() * SDL_GameControllerEventState(int(state)) */ - __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_state); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); - __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_set_eventstate, 54, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_set_eventstate, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 55, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":58 + /* "pygame/_sdl2/controller.pyx":59 * SDL_GameControllerEventState(int(state)) * * def get_eventstate(): # <<<<<<<<<<<<<< * GAMECONTROLLER_INIT_CHECK() * return SDL_GameControllerEventState(-1) == 1 */ - __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_eventstate, 58, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_eventstate, 59, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 59, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":62 + /* "pygame/_sdl2/controller.pyx":63 * return SDL_GameControllerEventState(-1) == 1 * * def get_count(): # <<<<<<<<<<<<<< * """ Returns the number of attached joysticks. * """ */ - __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_num); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_num); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_count, 62, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_get_count, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 63, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":70 + /* "pygame/_sdl2/controller.pyx":71 * return num * * def update(): # <<<<<<<<<<<<<< * """ Will automatically called by the event loop, * not necessary to call this function. */ - __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_update, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_update, 71, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 71, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":77 + /* "pygame/_sdl2/controller.pyx":78 * SDL_GameControllerUpdate() * * def is_controller(index): # <<<<<<<<<<<<<< * """ Check if the given joystick is supported by the game controller interface. * */ - __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_index); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_n_s_index); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); - __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_is_controller, 77, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_is_controller, 78, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 78, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":87 + /* "pygame/_sdl2/controller.pyx":88 * return SDL_IsGameController(index) == 1 * * def name_forindex(index): # <<<<<<<<<<<<<< * """ Returns the name of controller, * or NULL if there's no name or the index is invalid. */ - __pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_index, __pyx_n_s_max_controllers); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_index, __pyx_n_s_max_controllers); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); - __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_name_forindex, 87, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_name_forindex, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 88, __pyx_L1_error) - /* "pygame/_sdl2/controller.pyx":144 + /* "pygame/_sdl2/controller.pyx":145 * * @staticmethod * def from_joystick(joy): # <<<<<<<<<<<<<< * """ Create a controller object from pygame.joystick.Joystick object. * */ - __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_s_joy, __pyx_n_s_self); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_s_joy, __pyx_n_s_self); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); - __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_from_joystick, 144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sdl2_contro, __pyx_n_s_from_joystick, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -6431,7 +6483,7 @@ static int __Pyx_modinit_type_init_code(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_6pygame_5_sdl2_10controller_Controller) < 0) __PYX_ERR(0, 101, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_5_sdl2_10controller_Controller) < 0) __PYX_ERR(0, 102, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_5_sdl2_10controller_Controller.tp_print = 0; #endif @@ -6440,7 +6492,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_5_sdl2_10controller_Controller, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 101, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_5_sdl2_10controller_Controller, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 102, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6pygame_5_sdl2_10controller_10Controller___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_5_sdl2_10controller_10Controller___init__.doc = __pyx_doc_6pygame_5_sdl2_10controller_10Controller___init__; @@ -6448,8 +6500,8 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Controller, (PyObject *)&__pyx_type_6pygame_5_sdl2_10controller_Controller) < 0) __PYX_ERR(0, 101, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_5_sdl2_10controller_Controller) < 0) __PYX_ERR(0, 101, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Controller, (PyObject *)&__pyx_type_6pygame_5_sdl2_10controller_Controller) < 0) __PYX_ERR(0, 102, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_5_sdl2_10controller_Controller) < 0) __PYX_ERR(0, 102, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_10controller_Controller = &__pyx_type_6pygame_5_sdl2_10controller_Controller; __Pyx_RefNannyFinishContext(); return 0; @@ -6702,8 +6754,8 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":13 - * void SDL_free(void *mem) + /* "pygame/_sdl2/controller.pyx":14 + * int SDL_VERSION_ATLEAST(int major, int minor, int patch) * * import_pygame_joystick() # <<<<<<<<<<<<<< * @@ -6711,177 +6763,177 @@ if (!__Pyx_RefNanny) { */ import_pygame_joystick(); - /* "pygame/_sdl2/controller.pyx":15 + /* "pygame/_sdl2/controller.pyx":16 * import_pygame_joystick() * * def GAMECONTROLLER_INIT_CHECK(): # <<<<<<<<<<<<<< * if not SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * raise error("gamecontroller system not initialized") */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_1GAMECONTROLLER_INIT_CHECK, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_1GAMECONTROLLER_INIT_CHECK, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_GAMECONTROLLER_INIT_CHECK, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_GAMECONTROLLER_INIT_CHECK, __pyx_t_2) < 0) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":40 + /* "pygame/_sdl2/controller.pyx":41 * # not automatically initialize controller at this moment. * * def __PYGAMEinit__(**kwargs): # <<<<<<<<<<<<<< * _controller_autoinit() * */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_3__PYGAMEinit__, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_3__PYGAMEinit__, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYGAMEinit, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYGAMEinit, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":43 + /* "pygame/_sdl2/controller.pyx":44 * _controller_autoinit() * * def init(): # <<<<<<<<<<<<<< * if not _controller_autoinit(): * raise error() */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_5init, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_5init, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_init_2, __pyx_t_2) < 0) __PYX_ERR(0, 43, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_init_2, __pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":47 + /* "pygame/_sdl2/controller.pyx":48 * raise error() * * def get_init(): # <<<<<<<<<<<<<< * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_7get_init, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_7get_init, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_init, __pyx_t_2) < 0) __PYX_ERR(0, 47, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_init, __pyx_t_2) < 0) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":50 + /* "pygame/_sdl2/controller.pyx":51 * return not SDL_WasInit(_SDL_INIT_GAMECONTROLLER) == 0 * * def quit(): # <<<<<<<<<<<<<< * if SDL_WasInit(_SDL_INIT_GAMECONTROLLER): * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_9quit, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_9quit, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_quit, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_quit, __pyx_t_2) < 0) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":54 + /* "pygame/_sdl2/controller.pyx":55 * SDL_QuitSubSystem(_SDL_INIT_GAMECONTROLLER) * * def set_eventstate(state): # <<<<<<<<<<<<<< * GAMECONTROLLER_INIT_CHECK() * SDL_GameControllerEventState(int(state)) */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_11set_eventstate, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_11set_eventstate, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_eventstate, __pyx_t_2) < 0) __PYX_ERR(0, 54, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_eventstate, __pyx_t_2) < 0) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":58 + /* "pygame/_sdl2/controller.pyx":59 * SDL_GameControllerEventState(int(state)) * * def get_eventstate(): # <<<<<<<<<<<<<< * GAMECONTROLLER_INIT_CHECK() * return SDL_GameControllerEventState(-1) == 1 */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_13get_eventstate, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_13get_eventstate, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_eventstate, __pyx_t_2) < 0) __PYX_ERR(0, 58, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_eventstate, __pyx_t_2) < 0) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":62 + /* "pygame/_sdl2/controller.pyx":63 * return SDL_GameControllerEventState(-1) == 1 * * def get_count(): # <<<<<<<<<<<<<< * """ Returns the number of attached joysticks. * """ */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_15get_count, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_15get_count, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_count, __pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_count, __pyx_t_2) < 0) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":70 + /* "pygame/_sdl2/controller.pyx":71 * return num * * def update(): # <<<<<<<<<<<<<< * """ Will automatically called by the event loop, * not necessary to call this function. */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_17update, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_17update, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_update, __pyx_t_2) < 0) __PYX_ERR(0, 70, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_update, __pyx_t_2) < 0) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":77 + /* "pygame/_sdl2/controller.pyx":78 * SDL_GameControllerUpdate() * * def is_controller(index): # <<<<<<<<<<<<<< * """ Check if the given joystick is supported by the game controller interface. * */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_19is_controller, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_19is_controller, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_controller, __pyx_t_2) < 0) __PYX_ERR(0, 77, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_controller, __pyx_t_2) < 0) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":87 + /* "pygame/_sdl2/controller.pyx":88 * return SDL_IsGameController(index) == 1 * * def name_forindex(index): # <<<<<<<<<<<<<< * """ Returns the name of controller, * or NULL if there's no name or the index is invalid. */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_21name_forindex, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_21name_forindex, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_name_forindex, __pyx_t_2) < 0) __PYX_ERR(0, 87, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_name_forindex, __pyx_t_2) < 0) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sdl2/controller.pyx":102 + /* "pygame/_sdl2/controller.pyx":103 * * cdef class Controller: * _controllers = [] # <<<<<<<<<<<<<< * * def __init__(self, int index): */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller->tp_dict, __pyx_n_s_controllers, __pyx_t_2) < 0) __PYX_ERR(0, 102, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller->tp_dict, __pyx_n_s_controllers, __pyx_t_2) < 0) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); - /* "pygame/_sdl2/controller.pyx":144 + /* "pygame/_sdl2/controller.pyx":145 * * @staticmethod * def from_joystick(joy): # <<<<<<<<<<<<<< * """ Create a controller object from pygame.joystick.Joystick object. * */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_13from_joystick, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_10controller_10Controller_13from_joystick, NULL, __pyx_n_s_pygame__sdl2_controller); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller->tp_dict, __pyx_n_s_from_joystick, __pyx_t_2) < 0) __PYX_ERR(0, 144, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller->tp_dict, __pyx_n_s_from_joystick, __pyx_t_2) < 0) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); - /* "pygame/_sdl2/controller.pyx":143 + /* "pygame/_sdl2/controller.pyx":144 * self._controller = NULL * * @staticmethod # <<<<<<<<<<<<<< * def from_joystick(joy): * """ Create a controller object from pygame.joystick.Joystick object. */ - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_from_joystick); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller, __pyx_n_s_from_joystick); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller->tp_dict, __pyx_n_s_from_joystick, __pyx_t_1) < 0) __PYX_ERR(0, 144, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_5_sdl2_10controller_Controller->tp_dict, __pyx_n_s_from_joystick, __pyx_t_1) < 0) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6pygame_5_sdl2_10controller_Controller); diff --git a/src_c/_sdl2/sdl2.c b/src_c/_sdl2/sdl2.c index 0b5f552870..a38bd51bd9 100644 --- a/src_c/_sdl2/sdl2.c +++ b/src_c/_sdl2/sdl2.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.13 */ +/* Generated by Cython 0.29.24 */ /* BEGIN: Cython Metadata { @@ -6,22 +6,24 @@ "depends": [], "name": "pygame._sdl2.sdl2", "sources": [ - "src_c/cython/pygame/_sdl2/sdl2.pyx" + "src_c\\cython\\pygame\\_sdl2\\sdl2.pyx" ] }, "module_name": "pygame._sdl2.sdl2" } END: Cython Metadata */ +#ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_13" -#define CYTHON_HEX_VERSION 0x001D0DF0 +#define CYTHON_ABI "0_29_24" +#define CYTHON_HEX_VERSION 0x001D18F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -439,8 +441,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 + #if defined(PyUnicode_IS_READY) #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) + #else + #define __Pyx_PyUnicode_READY(op) (0) + #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) @@ -448,7 +454,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 @@ -497,8 +511,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif +#endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) @@ -509,6 +525,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else @@ -548,7 +571,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif @@ -589,11 +612,10 @@ static CYTHON_INLINE float __PYX_NAN() { #define __Pyx_truncl truncl #endif - +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ -{ \ - __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ -} + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifndef __PYX_EXTERN_C #ifdef __cplusplus @@ -817,7 +839,7 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { - "src_c/cython/pygame/_sdl2/sdl2.pyx", + "src_c\\cython\\pygame\\_sdl2\\sdl2.pyx", }; /*--- Type declarations ---*/ @@ -1075,7 +1097,7 @@ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bas /* FetchCommonType.proto */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); -/* CythonFunction.proto */ +/* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED 1 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 @@ -1103,6 +1125,7 @@ typedef struct { PyObject *func_classobj; void *defaults; int defaults_pyobjects; + size_t defaults_size; // used by FusedFunction for copying defaults int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; @@ -1111,9 +1134,7 @@ typedef struct { } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) -#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ - __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) -static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, @@ -1129,6 +1150,13 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(void); +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + /* SetNameInClass.proto */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 #define __Pyx_SetNameInClass(ns, name, value)\ @@ -1172,6 +1200,11 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); +/* GCCDiagnostics.proto */ +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); @@ -1245,7 +1278,7 @@ static const char __pyx_k_INIT_NOPARACHUTE[] = "INIT_NOPARACHUTE"; static const char __pyx_k_pygame__sdl2_sdl2[] = "pygame._sdl2.sdl2"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_INIT_GAMECONTROLLER[] = "INIT_GAMECONTROLLER"; -static const char __pyx_k_src_c_cython_pygame__sdl2_sdl2_p[] = "src_c/cython/pygame/_sdl2/sdl2.pyx"; +static const char __pyx_k_src_c_cython_pygame__sdl2_sdl2_p[] = "src_c\\cython\\pygame\\_sdl2\\sdl2.pyx"; static PyObject *__pyx_n_s_INIT_AUDIO; static PyObject *__pyx_n_s_INIT_EVENTS; static PyObject *__pyx_n_s_INIT_EVERYTHING; @@ -1298,6 +1331,9 @@ static PyMethodDef __pyx_mdef_6pygame_5_sdl2_4sdl2_5error_1__init__ = {"__init__ static PyObject *__pyx_pw_6pygame_5_sdl2_4sdl2_5error_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_message = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -1369,6 +1405,9 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_4sdl2_5error___init__(CYTHON_UNUSED PyO PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_message); @@ -1518,6 +1557,9 @@ static PyObject *__pyx_pf_6pygame_5_sdl2_4sdl2_init_subsystem(CYTHON_UNUSED PyOb PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init_subsystem", 0); /* "pygame/_sdl2/sdl2.pyx":46 @@ -1790,17 +1832,19 @@ static int __Pyx_modinit_function_import_code(void) { } -#if PY_MAJOR_VERSION < 3 -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC void -#else +#ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void #endif #else -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyObject * +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif @@ -1884,6 +1928,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_sdl2(PyObject *__pyx_pyinit_module PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { @@ -1931,11 +1978,9 @@ if (!__Pyx_RefNanny) { #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ - #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - #ifdef WITH_THREAD /* Python build with threading support? */ + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif - #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; @@ -1972,9 +2017,9 @@ if (!__Pyx_RefNanny) { } #endif /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); @@ -2007,7 +2052,7 @@ if (!__Pyx_RefNanny) { * if message is None: * message = SDL_GetError().decode('utf8') */ - __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_5_sdl2_4sdl2_5error_1__init__, 0, __pyx_n_s_error___init, NULL, __pyx_n_s_pygame__sdl2_sdl2, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_5_sdl2_4sdl2_5error_1__init__, 0, __pyx_n_s_error___init, NULL, __pyx_n_s_pygame__sdl2_sdl2, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__4); if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 6, __pyx_L1_error) @@ -2265,7 +2310,7 @@ static int __Pyx_ParseOptionalKeywords( } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 - if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { @@ -2292,7 +2337,7 @@ static int __Pyx_ParseOptionalKeywords( while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -2308,7 +2353,7 @@ static int __Pyx_ParseOptionalKeywords( while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -2393,9 +2438,9 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( if (stop < 0) stop += length; } + if (unlikely(stop <= start)) + return __Pyx_NewRef(__pyx_empty_unicode); length = stop - start; - if (unlikely(length <= 0)) - return PyUnicode_FromUnicode(NULL, 0); cstring += start; if (decode_func) { return decode_func(cstring, length, errors); @@ -2550,7 +2595,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; - ternaryfunc call = func->ob_type->tp_call; + ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) @@ -2691,7 +2736,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); #if CYTHON_FAST_PYCCALL - } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { + } else if (__Pyx_PyFastCFunction_Check(func)) { return __Pyx_PyCFunction_FastCall(func, &arg, 1); #endif } @@ -2970,7 +3015,7 @@ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { goto done; } -/* CythonFunction */ +/* CythonFunctionShared */ #include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) @@ -3263,7 +3308,8 @@ static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 - return PyUnicode_FromString(m->func.m_ml->ml_name); + Py_INCREF(m->func_qualname); + return m->func_qualname; #else return PyString_FromString(m->func.m_ml->ml_name); #endif @@ -3277,10 +3323,9 @@ static PyMethodDef __pyx_CyFunction_methods[] = { #else #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) #endif -static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); - if (op == NULL) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + if (unlikely(op == NULL)) return NULL; op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; @@ -3301,12 +3346,12 @@ static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int f Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; + op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; - PyObject_GC_Track(op); return (PyObject *) op; } static int @@ -3369,6 +3414,7 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { +#if PY_MAJOR_VERSION < 3 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); @@ -3381,6 +3427,7 @@ static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObj } if (obj == Py_None) obj = NULL; +#endif return __Pyx_PyMethod_New(func, obj, type); } static PyObject* @@ -3536,6 +3583,9 @@ static PyTypeObject __pyx_CyFunctionType_type = { #if PY_VERSION_HEX >= 0x030800b1 0, #endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, +#endif }; static int __pyx_CyFunction_init(void) { __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); @@ -3551,6 +3601,7 @@ static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; + m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { @@ -3569,6 +3620,19 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, Py Py_INCREF(dict); } +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { @@ -3638,7 +3702,7 @@ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObj /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -3742,7 +3806,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } @@ -3843,9 +3907,38 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, Py_XDECREF(py_frame); } +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { @@ -3874,31 +3967,16 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { } } -/* CIntFromPyVerify */ -#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) -#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ - {\ - func_type value = func_value;\ - if (sizeof(target_type) < sizeof(func_type)) {\ - if (unlikely(value != (func_type) (target_type) value)) {\ - func_type zero = 0;\ - if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ - return (target_type) -1;\ - if (is_unsigned && unlikely(value < zero))\ - goto raise_neg_overflow;\ - else\ - goto raise_overflow;\ - }\ - }\ - return (target_type) value;\ - } - /* CIntFromPy */ static CYTHON_INLINE Uint32 __Pyx_PyInt_As_Uint32(PyObject *x) { - const Uint32 neg_one = (Uint32) ((Uint32) 0 - (Uint32) 1), const_zero = (Uint32) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const Uint32 neg_one = (Uint32) -1, const_zero = (Uint32) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -4087,7 +4165,14 @@ static CYTHON_INLINE Uint32 __Pyx_PyInt_As_Uint32(PyObject *x) { /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { @@ -4118,7 +4203,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -4307,7 +4399,14 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { diff --git a/src_c/_sdl2/video.c b/src_c/_sdl2/video.c index bfb628f9b7..ca5e32da3c 100644 --- a/src_c/_sdl2/video.c +++ b/src_c/_sdl2/video.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.22 */ +/* Generated by Cython 0.29.24 */ /* BEGIN: Cython Metadata { @@ -6,22 +6,24 @@ "depends": [], "name": "pygame._sdl2.video", "sources": [ - "src_c/cython/pygame/_sdl2/video.pyx" + "src_c\\cython\\pygame\\_sdl2\\video.pyx" ] }, "module_name": "pygame._sdl2.video" } END: Cython Metadata */ +#ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_22" -#define CYTHON_HEX_VERSION 0x001D16F0 +#define CYTHON_ABI "0_29_24" +#define CYTHON_HEX_VERSION 0x001D18F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -439,8 +441,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 + #if defined(PyUnicode_IS_READY) #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) + #else + #define __Pyx_PyUnicode_READY(op) (0) + #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) @@ -449,7 +455,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #endif @@ -833,9 +843,9 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { - "src_c/cython/pygame/_sdl2/video.pyx", + "src_c\\cython\\pygame\\_sdl2\\video.pyx", "stringsource", - "src_c/cython/pygame/_sdl2/video.pxd", + "src_c\\cython\\pygame\\_sdl2\\video.pxd", "type.pxd", "bool.pxd", "complex.pxd", @@ -1766,6 +1776,7 @@ typedef struct { PyObject *gi_qualname; PyObject *gi_modulename; PyObject *gi_code; + PyObject *gi_frame; int resume_label; char is_running; } __pyx_CoroutineObject; @@ -2109,7 +2120,7 @@ static const char __pyx_k_srcrect_must_be_a_rect_or_None[] = "srcrect must be a static const char __pyx_k_dstrect_must_be_a_position_rect[] = "dstrect must be a position, rect, or None"; static const char __pyx_k_only_one_of_static_streaming_or[] = "only one of static, streaming, or target can be true"; static const char __pyx_k_s_name_s_flags_0x_02x_num_textu[] = "<%s(name: %s, flags: 0x%02x, num_texture_formats: %d, max_texture_width: %d, max_texture_height: %d)>"; -static const char __pyx_k_src_c_cython_pygame__sdl2_video[] = "src_c/cython/pygame/_sdl2/video.pyx"; +static const char __pyx_k_src_c_cython_pygame__sdl2_video[] = "src_c\\cython\\pygame\\_sdl2\\video.pyx"; static const char __pyx_k_surface_must_be_a_surface_or_No[] = "'surface' must be a surface or None"; static const char __pyx_k_the_argument_is_not_a_rectangle[] = "the argument is not a rectangle or None"; static const char __pyx_k_area_must_be_a_rectangle_or_None[] = "area must be a rectangle or None"; @@ -20647,11 +20658,9 @@ if (!__Pyx_RefNanny) { #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ - #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - #ifdef WITH_THREAD /* Python build with threading support? */ + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif - #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; @@ -21511,7 +21520,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; - ternaryfunc call = func->ob_type->tp_call; + ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) @@ -23964,7 +23973,8 @@ static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 - return PyUnicode_FromString(m->func.m_ml->ml_name); + Py_INCREF(m->func_qualname); + return m->func_qualname; #else return PyString_FromString(m->func.m_ml->ml_name); #endif @@ -26583,6 +26593,7 @@ static int __Pyx_Coroutine_clear(PyObject *self) { } #endif Py_CLEAR(gen->gi_code); + Py_CLEAR(gen->gi_frame); Py_CLEAR(gen->gi_name); Py_CLEAR(gen->gi_qualname); Py_CLEAR(gen->gi_modulename); @@ -26599,7 +26610,7 @@ static void __Pyx_Coroutine_dealloc(PyObject *self) { if (PyObject_CallFinalizerFromDealloc(self)) #else Py_TYPE(gen)->tp_del(self); - if (self->ob_refcnt > 0) + if (Py_REFCNT(self) > 0) #endif { return; @@ -26693,17 +26704,17 @@ static void __Pyx_Coroutine_del(PyObject *self) { } __Pyx_ErrRestore(error_type, error_value, error_traceback); #if !CYTHON_USE_TP_FINALIZE - assert(self->ob_refcnt > 0); + assert(Py_REFCNT(self) > 0); if (--self->ob_refcnt == 0) { return; } { - Py_ssize_t refcnt = self->ob_refcnt; + Py_ssize_t refcnt = Py_REFCNT(self); _Py_NewReference(self); __Pyx_SET_REFCNT(self, refcnt); } #if CYTHON_COMPILING_IN_CPYTHON - assert(PyType_IS_GC(self->ob_type) && + assert(PyType_IS_GC(Py_TYPE(self)) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); _Py_DEC_REFTOTAL; #endif @@ -26769,6 +26780,27 @@ __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHO Py_XDECREF(tmp); return 0; } +static PyObject * +__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) +{ + PyObject *frame = self->gi_frame; + if (!frame) { + if (unlikely(!self->gi_code)) { + Py_RETURN_NONE; + } + frame = (PyObject *) PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (unlikely(!frame)) + return NULL; + self->gi_frame = frame; + } + Py_INCREF(frame); + return frame; +} static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { @@ -26802,6 +26834,7 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( gen->gi_modulename = module_name; Py_XINCREF(code); gen->gi_code = code; + gen->gi_frame = NULL; PyObject_GC_Track(gen); return gen; } @@ -26925,6 +26958,8 @@ static PyGetSetDef __pyx_Generator_getsets[] = { (char*) PyDoc_STR("name of the generator"), 0}, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, (char*) PyDoc_STR("qualified name of the generator"), 0}, + {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + (char*) PyDoc_STR("Frame of the generator"), 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { diff --git a/src_c/_sprite.c b/src_c/_sprite.c index 40a2f803b2..da40dbbecf 100644 --- a/src_c/_sprite.c +++ b/src_c/_sprite.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.13 */ +/* Generated by Cython 0.29.24 */ /* BEGIN: Cython Metadata { @@ -6,22 +6,24 @@ "depends": [], "name": "pygame._sprite", "sources": [ - "src_c/cython/pygame/_sprite.pyx" + "src_c\\cython\\pygame\\_sprite.pyx" ] }, "module_name": "pygame._sprite" } END: Cython Metadata */ +#ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_13" -#define CYTHON_HEX_VERSION 0x001D0DF0 +#define CYTHON_ABI "0_29_24" +#define CYTHON_HEX_VERSION 0x001D18F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -439,8 +441,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 + #if defined(PyUnicode_IS_READY) #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) + #else + #define __Pyx_PyUnicode_READY(op) (0) + #endif #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) @@ -448,7 +454,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 @@ -497,8 +511,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif +#endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) @@ -509,6 +525,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else @@ -548,7 +571,7 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif @@ -589,11 +612,10 @@ static CYTHON_INLINE float __PYX_NAN() { #define __Pyx_truncl truncl #endif - +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ -{ \ - __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ -} + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifndef __PYX_EXTERN_C #ifdef __cplusplus @@ -820,12 +842,12 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { - "src_c/cython/pygame/_sprite.pyx", + "src_c\\cython\\pygame\\_sprite.pyx", "stringsource", "type.pxd", "bool.pxd", "complex.pxd", - "src_c/cython/pygame/_sdl2/video.pxd", + "src_c\\cython\\pygame\\_sdl2\\video.pxd", }; /*--- Type declarations ---*/ @@ -846,7 +868,7 @@ struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal; struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw; struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw; -/* "_sdl2/video.pxd":365 +/* "_sdl2/video.pxd":392 * * cpdef object get_viewport(self) * cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) # <<<<<<<<<<<<<< @@ -860,7 +882,7 @@ struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit { int special_flags; }; -/* "_sdl2/video.pxd":374 +/* "_sdl2/video.pxd":401 * cdef readonly int height * * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*, # <<<<<<<<<<<<<< @@ -875,7 +897,7 @@ struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw_internal { int flipY; }; -/* "_sdl2/video.pxd":376 +/* "_sdl2/video.pxd":403 * cdef draw_internal(self, SDL_Rect *csrcrect, SDL_Rect *cdstrect, float angle=*, SDL_Point *originptr=*, * bint flipX=*, bint flipY=*) * cpdef void draw(self, srcrect=*, dstrect=*, float angle=*, origin=*, # <<<<<<<<<<<<<< @@ -892,7 +914,7 @@ struct __pyx_opt_args_6pygame_5_sdl2_5video_7Texture_draw { int flipY; }; -/* "_sdl2/video.pxd":390 +/* "_sdl2/video.pxd":419 * cdef public Rect srcrect * * cpdef void draw(self, srcrect=*, dstrect=*) # <<<<<<<<<<<<<< @@ -905,7 +927,7 @@ struct __pyx_opt_args_6pygame_5_sdl2_5video_5Image_draw { struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal; struct __pyx_opt_args_6pygame_7_sprite_12LayeredDirty_add_internal; -/* "pygame/_sprite.pyx":699 +/* "pygame/_sprite.pyx":701 * self.add(*sprites, **kwargs) * * cpdef void add_internal(self, sprite, layer=None): # <<<<<<<<<<<<<< @@ -917,7 +939,7 @@ struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal { PyObject *layer; }; -/* "pygame/_sprite.pyx":1061 +/* "pygame/_sprite.pyx":1063 * setattr(self, key, val) * * cpdef void add_internal(self, sprite, layer=None): # <<<<<<<<<<<<<< @@ -929,21 +951,22 @@ struct __pyx_opt_args_6pygame_7_sprite_12LayeredDirty_add_internal { PyObject *layer; }; -/* "_sdl2/video.pxd":355 +/* "_sdl2/video.pxd":380 * * * cdef class Window: # <<<<<<<<<<<<<< * cdef SDL_Window* _win - * + * cdef int _is_borrowed */ struct __pyx_obj_6pygame_5_sdl2_5video_Window { PyObject_HEAD SDL_Window *_win; + int _is_borrowed; }; -/* "_sdl2/video.pxd":358 - * cdef SDL_Window* _win +/* "_sdl2/video.pxd":384 + * cdef int _is_borrowed * * cdef class Renderer: # <<<<<<<<<<<<<< * cdef SDL_Renderer* _renderer @@ -956,10 +979,11 @@ struct __pyx_obj_6pygame_5_sdl2_5video_Renderer { pgColorObject *_draw_color; struct __pyx_obj_6pygame_5_sdl2_5video_Texture *_target; struct __pyx_obj_6pygame_5_sdl2_5video_Window *_win; + int _is_borrowed; }; -/* "_sdl2/video.pxd":367 +/* "_sdl2/video.pxd":394 * cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) * * cdef class Texture: # <<<<<<<<<<<<<< @@ -977,28 +1001,30 @@ struct __pyx_obj_6pygame_5_sdl2_5video_Texture { }; -/* "_sdl2/video.pxd":379 +/* "_sdl2/video.pxd":406 * bint flipX=*, bint flipY=*) * * cdef class Image: # <<<<<<<<<<<<<< + * cdef Color _color * cdef public float angle - * cdef public float origin[2] */ struct __pyx_obj_6pygame_5_sdl2_5video_Image { PyObject_HEAD struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image *__pyx_vtab; + pgColorObject *_color; float angle; - float origin[2]; + SDL_Point _origin; + SDL_Point *_originptr; int flipX; int flipY; - pgColorObject *color; float alpha; + SDL_BlendMode blend_mode; struct __pyx_obj_6pygame_5_sdl2_5video_Texture *texture; pgRectObject *srcrect; }; -/* "pygame/_sprite.pyx":126 +/* "pygame/_sprite.pyx":128 * * * cdef class Sprite: # <<<<<<<<<<<<<< @@ -1015,7 +1041,7 @@ struct __pyx_obj_6pygame_7_sprite_Sprite { }; -/* "pygame/_sprite.pyx":123 +/* "pygame/_sprite.pyx":125 * from ._sdl2.video cimport * * * cdef class AbstractGroup # <<<<<<<<<<<<<< @@ -1030,7 +1056,7 @@ struct __pyx_obj_6pygame_7_sprite_AbstractGroup { }; -/* "pygame/_sprite.pyx":576 +/* "pygame/_sprite.pyx":578 * return "<%s(%d sprites)>" % (self.__class__.__name__, len(self)) * * cdef class Group(AbstractGroup): # <<<<<<<<<<<<<< @@ -1042,7 +1068,7 @@ struct __pyx_obj_6pygame_7_sprite_Group { }; -/* "pygame/_sprite.pyx":602 +/* "pygame/_sprite.pyx":604 * RenderClear = Group * * cdef class RenderUpdates(Group): # <<<<<<<<<<<<<< @@ -1054,7 +1080,7 @@ struct __pyx_obj_6pygame_7_sprite_RenderUpdates { }; -/* "pygame/_sprite.pyx":631 +/* "pygame/_sprite.pyx":633 * return dirty * * cdef class OrderedUpdates(RenderUpdates): # <<<<<<<<<<<<<< @@ -1067,7 +1093,7 @@ struct __pyx_obj_6pygame_7_sprite_OrderedUpdates { }; -/* "pygame/_sprite.pyx":661 +/* "pygame/_sprite.pyx":663 * * * cdef class LayeredUpdates(AbstractGroup): # <<<<<<<<<<<<<< @@ -1082,7 +1108,7 @@ struct __pyx_obj_6pygame_7_sprite_LayeredUpdates { }; -/* "pygame/_sprite.pyx":1002 +/* "pygame/_sprite.pyx":1004 * * * cdef class LayeredDirty(LayeredUpdates): # <<<<<<<<<<<<<< @@ -1098,7 +1124,7 @@ struct __pyx_obj_6pygame_7_sprite_LayeredDirty { }; -/* "pygame/_sprite.pyx":1291 +/* "pygame/_sprite.pyx":1293 * * * cdef class GroupSingle(AbstractGroup): # <<<<<<<<<<<<<< @@ -1112,8 +1138,8 @@ struct __pyx_obj_6pygame_7_sprite_GroupSingle { -/* "_sdl2/video.pxd":358 - * cdef SDL_Window* _win +/* "_sdl2/video.pxd":384 + * cdef int _is_borrowed * * cdef class Renderer: # <<<<<<<<<<<<<< * cdef SDL_Renderer* _renderer @@ -1127,7 +1153,7 @@ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer { static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer *__pyx_vtabptr_6pygame_5_sdl2_5video_Renderer; -/* "_sdl2/video.pxd":367 +/* "_sdl2/video.pxd":394 * cpdef object blit(self, object source, Rect dest=*, Rect area=*, int special_flags=*) * * cdef class Texture: # <<<<<<<<<<<<<< @@ -1142,12 +1168,12 @@ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture { static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture *__pyx_vtabptr_6pygame_5_sdl2_5video_Texture; -/* "_sdl2/video.pxd":379 +/* "_sdl2/video.pxd":406 * bint flipX=*, bint flipY=*) * * cdef class Image: # <<<<<<<<<<<<<< + * cdef Color _color * cdef public float angle - * cdef public float origin[2] */ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image { @@ -1156,7 +1182,7 @@ struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image { static struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image *__pyx_vtabptr_6pygame_5_sdl2_5video_Image; -/* "pygame/_sprite.pyx":313 +/* "pygame/_sprite.pyx":315 * * * cdef class AbstractGroup: # <<<<<<<<<<<<<< @@ -1173,7 +1199,7 @@ struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup { static struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *__pyx_vtabptr_6pygame_7_sprite_AbstractGroup; -/* "pygame/_sprite.pyx":126 +/* "pygame/_sprite.pyx":128 * * * cdef class Sprite: # <<<<<<<<<<<<<< @@ -1188,7 +1214,7 @@ struct __pyx_vtabstruct_6pygame_7_sprite_Sprite { static struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *__pyx_vtabptr_6pygame_7_sprite_Sprite; -/* "pygame/_sprite.pyx":576 +/* "pygame/_sprite.pyx":578 * return "<%s(%d sprites)>" % (self.__class__.__name__, len(self)) * * cdef class Group(AbstractGroup): # <<<<<<<<<<<<<< @@ -1202,7 +1228,7 @@ struct __pyx_vtabstruct_6pygame_7_sprite_Group { static struct __pyx_vtabstruct_6pygame_7_sprite_Group *__pyx_vtabptr_6pygame_7_sprite_Group; -/* "pygame/_sprite.pyx":602 +/* "pygame/_sprite.pyx":604 * RenderClear = Group * * cdef class RenderUpdates(Group): # <<<<<<<<<<<<<< @@ -1216,7 +1242,7 @@ struct __pyx_vtabstruct_6pygame_7_sprite_RenderUpdates { static struct __pyx_vtabstruct_6pygame_7_sprite_RenderUpdates *__pyx_vtabptr_6pygame_7_sprite_RenderUpdates; -/* "pygame/_sprite.pyx":631 +/* "pygame/_sprite.pyx":633 * return dirty * * cdef class OrderedUpdates(RenderUpdates): # <<<<<<<<<<<<<< @@ -1230,7 +1256,7 @@ struct __pyx_vtabstruct_6pygame_7_sprite_OrderedUpdates { static struct __pyx_vtabstruct_6pygame_7_sprite_OrderedUpdates *__pyx_vtabptr_6pygame_7_sprite_OrderedUpdates; -/* "pygame/_sprite.pyx":661 +/* "pygame/_sprite.pyx":663 * * * cdef class LayeredUpdates(AbstractGroup): # <<<<<<<<<<<<<< @@ -1245,7 +1271,7 @@ struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates { static struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *__pyx_vtabptr_6pygame_7_sprite_LayeredUpdates; -/* "pygame/_sprite.pyx":1002 +/* "pygame/_sprite.pyx":1004 * * * cdef class LayeredDirty(LayeredUpdates): # <<<<<<<<<<<<<< @@ -1259,7 +1285,7 @@ struct __pyx_vtabstruct_6pygame_7_sprite_LayeredDirty { static struct __pyx_vtabstruct_6pygame_7_sprite_LayeredDirty *__pyx_vtabptr_6pygame_7_sprite_LayeredDirty; -/* "pygame/_sprite.pyx":1291 +/* "pygame/_sprite.pyx":1293 * * * cdef class GroupSingle(AbstractGroup): # <<<<<<<<<<<<<< @@ -1600,7 +1626,7 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); - Py_SIZE(list) = len+1; + __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); @@ -1759,7 +1785,7 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); - Py_SIZE(list) = len+1; + __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); @@ -1821,6 +1847,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); @@ -1842,7 +1871,7 @@ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* s /* FetchCommonType.proto */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); -/* CythonFunction.proto */ +/* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED 1 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 @@ -1870,6 +1899,7 @@ typedef struct { PyObject *func_classobj; void *defaults; int defaults_pyobjects; + size_t defaults_size; // used by FusedFunction for copying defaults int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; @@ -1878,9 +1908,7 @@ typedef struct { } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) -#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ - __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) -static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, @@ -1896,6 +1924,13 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(void); +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); @@ -1946,15 +1981,20 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); +/* GCCDiagnostics.proto */ +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -/* CIntFromPy.proto */ -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); @@ -2280,7 +2320,7 @@ static const char __pyx_k_collide_rect_ratio___init[] = "collide_rect_ratio.__in static const char __pyx_k_s_DirtySprite_in_d_groups[] = "<%s DirtySprite(in %d groups)>"; static const char __pyx_k_collide_circle_ratio___call[] = "collide_circle_ratio.__call__"; static const char __pyx_k_collide_circle_ratio___init[] = "collide_circle_ratio.__init__"; -static const char __pyx_k_src_c_cython_pygame__sprite_pyx[] = "src_c/cython/pygame/_sprite.pyx"; +static const char __pyx_k_src_c_cython_pygame__sprite_pyx[] = "src_c\\cython\\pygame\\_sprite.pyx"; static const char __pyx_k_A_callable_class_that_checks_for[] = "A callable class that checks for collisions using scaled rects\n\n The class checks for collisions between two sprites using a scaled version\n of the sprites' rects. Is created with a ratio; the instance is then\n intended to be passed as a collided callback function to the *collide\n functions.\n\n New in pygame 1.8.1\n\n "; static const char __pyx_k_The_sprite_contained_in_this_gro[] = "The sprite contained in this group"; static const char __pyx_k_a_more_featureful_subclass_of_Sp[] = "a more featureful subclass of Sprite with more attributes\n\n pygame.sprite.DirtySprite(*groups): return DirtySprite\n\n Extra DirtySprite attributes with their default values:\n\n dirty = 1\n If set to 1, it is repainted and then set to 0 again.\n If set to 2, it is always dirty (repainted each frame;\n flag is not reset).\n If set to 0, it is not dirty and therefore not repainted again.\n\n blendmode = 0\n It's the special_flags argument of Surface.blit; see the blendmodes in\n the Surface.blit documentation\n\n source_rect = None\n This is the source rect to use. Remember that it is relative to the top\n left corner (0, 0) of self.image.\n\n visible = 1\n Normally this is 1. If set to 0, it will not be repainted. (If you\n change visible to 1, you must set dirty to 1 for it to be erased from\n the screen.)\n\n _layer = 0\n 0 is the default value but this is able to be set differently\n when subclassing.\n\n "; @@ -2675,7 +2715,7 @@ static PyObject *__pyx_codeobj__45; static PyObject *__pyx_codeobj__47; /* Late includes */ -/* "pygame/_sprite.pyx":100 +/* "pygame/_sprite.pyx":102 * # with the hasattr function. * if 'callable' not in dir(__builtins__): * callable = lambda obj: hasattr(obj, '__call__') # <<<<<<<<<<<<<< @@ -2702,10 +2742,13 @@ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_lambda(CYTHON_UNUSED PyOb __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_HasAttr(__pyx_v_obj, __pyx_n_s_call); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 100, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_1 = __Pyx_HasAttr(__pyx_v_obj, __pyx_n_s_call); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -2722,7 +2765,7 @@ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_lambda(CYTHON_UNUSED PyOb return __pyx_r; } -/* "pygame/_sprite.pyx":146 +/* "pygame/_sprite.pyx":148 * cdef dict __dict__ * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -2750,16 +2793,19 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite___cinit__(struct __pyx_obj_6pygame_ int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "pygame/_sprite.pyx":147 + /* "pygame/_sprite.pyx":149 * * def __cinit__(self): * self.__dict__ = {} # <<<<<<<<<<<<<< * self.__g = {} # The groups the sprite is in * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__dict__); @@ -2767,14 +2813,14 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite___cinit__(struct __pyx_obj_6pygame_ __pyx_v_self->__dict__ = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":148 + /* "pygame/_sprite.pyx":150 * def __cinit__(self): * self.__dict__ = {} * self.__g = {} # The groups the sprite is in # <<<<<<<<<<<<<< * * def __init__(self, *groups): */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__g); @@ -2782,7 +2828,7 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite___cinit__(struct __pyx_obj_6pygame_ __pyx_v_self->__g = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":146 + /* "pygame/_sprite.pyx":148 * cdef dict __dict__ * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -2802,7 +2848,7 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite___cinit__(struct __pyx_obj_6pygame_ return __pyx_r; } -/* "pygame/_sprite.pyx":150 +/* "pygame/_sprite.pyx":152 * self.__g = {} # The groups the sprite is in * * def __init__(self, *groups): # <<<<<<<<<<<<<< @@ -2834,9 +2880,12 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite_2__init__(struct __pyx_obj_6pygame_ int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sprite.pyx":151 + /* "pygame/_sprite.pyx":153 * * def __init__(self, *groups): * if groups: # <<<<<<<<<<<<<< @@ -2846,21 +2895,21 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite_2__init__(struct __pyx_obj_6pygame_ __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_groups) != 0); if (__pyx_t_1) { - /* "pygame/_sprite.pyx":152 + /* "pygame/_sprite.pyx":154 * def __init__(self, *groups): * if groups: * self.add(*groups) # <<<<<<<<<<<<<< * * def add(self, *groups): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_groups, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_groups, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":151 + /* "pygame/_sprite.pyx":153 * * def __init__(self, *groups): * if groups: # <<<<<<<<<<<<<< @@ -2869,7 +2918,7 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite_2__init__(struct __pyx_obj_6pygame_ */ } - /* "pygame/_sprite.pyx":150 + /* "pygame/_sprite.pyx":152 * self.__g = {} # The groups the sprite is in * * def __init__(self, *groups): # <<<<<<<<<<<<<< @@ -2890,7 +2939,7 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite_2__init__(struct __pyx_obj_6pygame_ return __pyx_r; } -/* "pygame/_sprite.pyx":154 +/* "pygame/_sprite.pyx":156 * self.add(*groups) * * def add(self, *groups): # <<<<<<<<<<<<<< @@ -2929,21 +2978,24 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add", 0); - /* "pygame/_sprite.pyx":163 + /* "pygame/_sprite.pyx":165 * * """ * has = self.__g.__contains__ # <<<<<<<<<<<<<< * for group in groups: * if hasattr(group, '_spritegroup'): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__g, __pyx_n_s_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__g, __pyx_n_s_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_has = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":164 + /* "pygame/_sprite.pyx":166 * """ * has = self.__g.__contains__ * for group in groups: # <<<<<<<<<<<<<< @@ -2954,26 +3006,26 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 166, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":165 + /* "pygame/_sprite.pyx":167 * has = self.__g.__contains__ * for group in groups: * if hasattr(group, '_spritegroup'): # <<<<<<<<<<<<<< * if not has(group): * (group).add_internal(self) */ - __pyx_t_4 = __Pyx_HasAttr(__pyx_v_group, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(__pyx_v_group, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 167, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":166 + /* "pygame/_sprite.pyx":168 * for group in groups: * if hasattr(group, '_spritegroup'): * if not has(group): # <<<<<<<<<<<<<< @@ -2993,15 +3045,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_group) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_group); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 166, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = ((!__pyx_t_5) != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":167 + /* "pygame/_sprite.pyx":169 * if hasattr(group, '_spritegroup'): * if not has(group): * (group).add_internal(self) # <<<<<<<<<<<<<< @@ -3010,7 +3062,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_group)->__pyx_vtab)->add_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_group), ((PyObject *)__pyx_v_self), 0); - /* "pygame/_sprite.pyx":168 + /* "pygame/_sprite.pyx":170 * if not has(group): * (group).add_internal(self) * self.add_internal(group) # <<<<<<<<<<<<<< @@ -3019,7 +3071,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame */ ((struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *)__pyx_v_self->__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_group, 0); - /* "pygame/_sprite.pyx":166 + /* "pygame/_sprite.pyx":168 * for group in groups: * if hasattr(group, '_spritegroup'): * if not has(group): # <<<<<<<<<<<<<< @@ -3028,7 +3080,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame */ } - /* "pygame/_sprite.pyx":165 + /* "pygame/_sprite.pyx":167 * has = self.__g.__contains__ * for group in groups: * if hasattr(group, '_spritegroup'): # <<<<<<<<<<<<<< @@ -3038,7 +3090,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame goto __pyx_L5; } - /* "pygame/_sprite.pyx":170 + /* "pygame/_sprite.pyx":172 * self.add_internal(group) * else: * self.add(*group) # <<<<<<<<<<<<<< @@ -3046,11 +3098,11 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame * def remove(self, *groups): */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_v_group); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_v_group); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -3058,7 +3110,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame } __pyx_L5:; - /* "pygame/_sprite.pyx":164 + /* "pygame/_sprite.pyx":166 * """ * has = self.__g.__contains__ * for group in groups: # <<<<<<<<<<<<<< @@ -3068,7 +3120,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":154 + /* "pygame/_sprite.pyx":156 * self.add(*groups) * * def add(self, *groups): # <<<<<<<<<<<<<< @@ -3094,7 +3146,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_4add(struct __pyx_obj_6pygame return __pyx_r; } -/* "pygame/_sprite.pyx":172 +/* "pygame/_sprite.pyx":174 * self.add(*group) * * def remove(self, *groups): # <<<<<<<<<<<<<< @@ -3133,21 +3185,24 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove", 0); - /* "pygame/_sprite.pyx":181 + /* "pygame/_sprite.pyx":183 * * """ * has = self.__g.__contains__ # <<<<<<<<<<<<<< * for group in groups: * if hasattr(group, '_spritegroup'): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__g, __pyx_n_s_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__g, __pyx_n_s_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_has = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":182 + /* "pygame/_sprite.pyx":184 * """ * has = self.__g.__contains__ * for group in groups: # <<<<<<<<<<<<<< @@ -3158,26 +3213,26 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_group, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":183 + /* "pygame/_sprite.pyx":185 * has = self.__g.__contains__ * for group in groups: * if hasattr(group, '_spritegroup'): # <<<<<<<<<<<<<< * if has(group): * group.remove_internal(self) */ - __pyx_t_4 = __Pyx_HasAttr(__pyx_v_group, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(__pyx_v_group, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 185, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":184 + /* "pygame/_sprite.pyx":186 * for group in groups: * if hasattr(group, '_spritegroup'): * if has(group): # <<<<<<<<<<<<<< @@ -3197,21 +3252,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_group) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_group); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { - /* "pygame/_sprite.pyx":185 + /* "pygame/_sprite.pyx":187 * if hasattr(group, '_spritegroup'): * if has(group): * group.remove_internal(self) # <<<<<<<<<<<<<< * self.remove_internal(group) * else: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -3225,12 +3280,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":186 + /* "pygame/_sprite.pyx":188 * if has(group): * group.remove_internal(self) * self.remove_internal(group) # <<<<<<<<<<<<<< @@ -3239,7 +3294,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg */ ((struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *)__pyx_v_self->__pyx_vtab)->remove_internal(__pyx_v_self, __pyx_v_group, 0); - /* "pygame/_sprite.pyx":184 + /* "pygame/_sprite.pyx":186 * for group in groups: * if hasattr(group, '_spritegroup'): * if has(group): # <<<<<<<<<<<<<< @@ -3248,7 +3303,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg */ } - /* "pygame/_sprite.pyx":183 + /* "pygame/_sprite.pyx":185 * has = self.__g.__contains__ * for group in groups: * if hasattr(group, '_spritegroup'): # <<<<<<<<<<<<<< @@ -3258,7 +3313,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg goto __pyx_L5; } - /* "pygame/_sprite.pyx":188 + /* "pygame/_sprite.pyx":190 * self.remove_internal(group) * else: * self.remove(*group) # <<<<<<<<<<<<<< @@ -3266,11 +3321,11 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg * cpdef void add_internal(self, group): */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_v_group); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_v_group); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -3278,7 +3333,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg } __pyx_L5:; - /* "pygame/_sprite.pyx":182 + /* "pygame/_sprite.pyx":184 * """ * has = self.__g.__contains__ * for group in groups: # <<<<<<<<<<<<<< @@ -3288,7 +3343,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":172 + /* "pygame/_sprite.pyx":174 * self.add(*group) * * def remove(self, *groups): # <<<<<<<<<<<<<< @@ -3314,7 +3369,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_6remove(struct __pyx_obj_6pyg return __pyx_r; } -/* "pygame/_sprite.pyx":190 +/* "pygame/_sprite.pyx":192 * self.remove(*group) * * cpdef void add_internal(self, group): # <<<<<<<<<<<<<< @@ -3329,6 +3384,9 @@ static void __pyx_f_6pygame_7_sprite_6Sprite_add_internal(struct __pyx_obj_6pyga PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -3339,7 +3397,7 @@ static void __pyx_f_6pygame_7_sprite_6Sprite_add_internal(struct __pyx_obj_6pyga if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_6Sprite_9add_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -3355,7 +3413,7 @@ static void __pyx_f_6pygame_7_sprite_6Sprite_add_internal(struct __pyx_obj_6pyga } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_group) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_group); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -3375,7 +3433,7 @@ static void __pyx_f_6pygame_7_sprite_6Sprite_add_internal(struct __pyx_obj_6pyga #endif } - /* "pygame/_sprite.pyx":191 + /* "pygame/_sprite.pyx":193 * * cpdef void add_internal(self, group): * self.__g[group] = 0 # <<<<<<<<<<<<<< @@ -3384,11 +3442,11 @@ static void __pyx_f_6pygame_7_sprite_6Sprite_add_internal(struct __pyx_obj_6pyga */ if (unlikely(__pyx_v_self->__g == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 191, __pyx_L1_error) + __PYX_ERR(0, 193, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->__g, __pyx_v_group, __pyx_int_0) < 0)) __PYX_ERR(0, 191, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->__g, __pyx_v_group, __pyx_int_0) < 0)) __PYX_ERR(0, 193, __pyx_L1_error) - /* "pygame/_sprite.pyx":190 + /* "pygame/_sprite.pyx":192 * self.remove(*group) * * cpdef void add_internal(self, group): # <<<<<<<<<<<<<< @@ -3425,9 +3483,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_8add_internal(struct __pyx_ob PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_6Sprite_add_internal(__pyx_v_self, __pyx_v_group, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_6Sprite_add_internal(__pyx_v_self, __pyx_v_group, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3444,7 +3505,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_8add_internal(struct __pyx_ob return __pyx_r; } -/* "pygame/_sprite.pyx":193 +/* "pygame/_sprite.pyx":195 * self.__g[group] = 0 * * cpdef void remove_internal(self, group): # <<<<<<<<<<<<<< @@ -3459,6 +3520,9 @@ static void __pyx_f_6pygame_7_sprite_6Sprite_remove_internal(struct __pyx_obj_6p PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -3469,7 +3533,7 @@ static void __pyx_f_6pygame_7_sprite_6Sprite_remove_internal(struct __pyx_obj_6p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_6Sprite_11remove_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -3485,7 +3549,7 @@ static void __pyx_f_6pygame_7_sprite_6Sprite_remove_internal(struct __pyx_obj_6p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_group) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_group); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -3505,7 +3569,7 @@ static void __pyx_f_6pygame_7_sprite_6Sprite_remove_internal(struct __pyx_obj_6p #endif } - /* "pygame/_sprite.pyx":194 + /* "pygame/_sprite.pyx":196 * * cpdef void remove_internal(self, group): * del self.__g[group] # <<<<<<<<<<<<<< @@ -3514,11 +3578,11 @@ static void __pyx_f_6pygame_7_sprite_6Sprite_remove_internal(struct __pyx_obj_6p */ if (unlikely(__pyx_v_self->__g == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 194, __pyx_L1_error) + __PYX_ERR(0, 196, __pyx_L1_error) } - if (unlikely(PyDict_DelItem(__pyx_v_self->__g, __pyx_v_group) < 0)) __PYX_ERR(0, 194, __pyx_L1_error) + if (unlikely(PyDict_DelItem(__pyx_v_self->__g, __pyx_v_group) < 0)) __PYX_ERR(0, 196, __pyx_L1_error) - /* "pygame/_sprite.pyx":193 + /* "pygame/_sprite.pyx":195 * self.__g[group] = 0 * * cpdef void remove_internal(self, group): # <<<<<<<<<<<<<< @@ -3555,9 +3619,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_10remove_internal(struct __py PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_6Sprite_remove_internal(__pyx_v_self, __pyx_v_group, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_6Sprite_remove_internal(__pyx_v_self, __pyx_v_group, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -3574,7 +3641,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_10remove_internal(struct __py return __pyx_r; } -/* "pygame/_sprite.pyx":196 +/* "pygame/_sprite.pyx":198 * del self.__g[group] * * def update(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -3615,7 +3682,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_12update(CYTHON_UNUSED struct return __pyx_r; } -/* "pygame/_sprite.pyx":211 +/* "pygame/_sprite.pyx":213 * pass * * def kill(self): # <<<<<<<<<<<<<< @@ -3650,9 +3717,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_14kill(struct __pyx_obj_6pyga PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("kill", 0); - /* "pygame/_sprite.pyx":222 + /* "pygame/_sprite.pyx":224 * * """ * for c in self.__g: # <<<<<<<<<<<<<< @@ -3662,9 +3732,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_14kill(struct __pyx_obj_6pyga __pyx_t_2 = 0; if (unlikely(__pyx_v_self->__g == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 222, __pyx_L1_error) + __PYX_ERR(0, 224, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->__g, 1, ((PyObject *)NULL), (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->__g, 1, ((PyObject *)NULL), (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -3672,19 +3742,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_14kill(struct __pyx_obj_6pyga while (1) { __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, NULL, NULL, __pyx_t_4); if (unlikely(__pyx_t_6 == 0)) break; - if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 222, __pyx_L1_error) + if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_5); __pyx_t_5 = 0; - /* "pygame/_sprite.pyx":223 + /* "pygame/_sprite.pyx":225 * """ * for c in self.__g: * c.remove_internal(self) # <<<<<<<<<<<<<< * self.__g.clear() * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -3698,14 +3768,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_14kill(struct __pyx_obj_6pyga } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":224 + /* "pygame/_sprite.pyx":226 * for c in self.__g: * c.remove_internal(self) * self.__g.clear() # <<<<<<<<<<<<<< @@ -3714,11 +3784,11 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_14kill(struct __pyx_obj_6pyga */ if (unlikely(__pyx_v_self->__g == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 226, __pyx_L1_error) } - __pyx_t_9 = __Pyx_PyDict_Clear(__pyx_v_self->__g); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_Clear(__pyx_v_self->__g); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 226, __pyx_L1_error) - /* "pygame/_sprite.pyx":211 + /* "pygame/_sprite.pyx":213 * pass * * def kill(self): # <<<<<<<<<<<<<< @@ -3743,7 +3813,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_14kill(struct __pyx_obj_6pyga return __pyx_r; } -/* "pygame/_sprite.pyx":226 +/* "pygame/_sprite.pyx":228 * self.__g.clear() * * def groups(self): # <<<<<<<<<<<<<< @@ -3769,9 +3839,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_16groups(struct __pyx_obj_6py PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groups", 0); - /* "pygame/_sprite.pyx":234 + /* "pygame/_sprite.pyx":236 * * """ * return list(self.__g) # <<<<<<<<<<<<<< @@ -3779,13 +3852,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_16groups(struct __pyx_obj_6py * def alive(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PySequence_List(__pyx_v_self->__g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_v_self->__g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":226 + /* "pygame/_sprite.pyx":228 * self.__g.clear() * * def groups(self): # <<<<<<<<<<<<<< @@ -3804,7 +3877,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_16groups(struct __pyx_obj_6py return __pyx_r; } -/* "pygame/_sprite.pyx":236 +/* "pygame/_sprite.pyx":238 * return list(self.__g) * * def alive(self): # <<<<<<<<<<<<<< @@ -3832,9 +3905,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_18alive(struct __pyx_obj_6pyg PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("alive", 0); - /* "pygame/_sprite.pyx":243 + /* "pygame/_sprite.pyx":245 * Returns True when the Sprite belongs to one or more Groups. * """ * return truth(self.__g) # <<<<<<<<<<<<<< @@ -3842,7 +3918,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_18alive(struct __pyx_obj_6pyg * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_truth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_truth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -3856,14 +3932,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_18alive(struct __pyx_obj_6pyg } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self->__g) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->__g); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":236 + /* "pygame/_sprite.pyx":238 * return list(self.__g) * * def alive(self): # <<<<<<<<<<<<<< @@ -3884,7 +3960,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_18alive(struct __pyx_obj_6pyg return __pyx_r; } -/* "pygame/_sprite.pyx":245 +/* "pygame/_sprite.pyx":247 * return truth(self.__g) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -3912,9 +3988,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_20__repr__(struct __pyx_obj_6 PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pygame/_sprite.pyx":246 + /* "pygame/_sprite.pyx":248 * * def __repr__(self): * return "<%s sprite(in %d groups)>" % (self.__class__.__name__, len(self.__g)) # <<<<<<<<<<<<<< @@ -3922,22 +4001,22 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_20__repr__(struct __pyx_obj_6 * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_v_self->__g; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 246, __pyx_L1_error) + __PYX_ERR(0, 248, __pyx_L1_error) } - __pyx_t_3 = PyDict_Size(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_3 = PyDict_Size(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -3945,14 +4024,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_20__repr__(struct __pyx_obj_6 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_sprite_in_d_groups, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_sprite_in_d_groups, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":245 + /* "pygame/_sprite.pyx":247 * return truth(self.__g) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -3973,7 +4052,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_20__repr__(struct __pyx_obj_6 return __pyx_r; } -/* "pygame/_sprite.pyx":141 +/* "pygame/_sprite.pyx":143 * """ * * cdef public dict __g # <<<<<<<<<<<<<< @@ -4027,8 +4106,11 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite_3__g_2__set__(struct __pyx_obj_6pyg int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 141, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 143, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -4078,7 +4160,7 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite_3__g_4__del__(struct __pyx_obj_6pyg return __pyx_r; } -/* "pygame/_sprite.pyx":142 +/* "pygame/_sprite.pyx":144 * * cdef public dict __g * cdef public object image # <<<<<<<<<<<<<< @@ -4173,7 +4255,7 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite_5image_4__del__(struct __pyx_obj_6p return __pyx_r; } -/* "pygame/_sprite.pyx":143 +/* "pygame/_sprite.pyx":145 * cdef public dict __g * cdef public object image * cdef public Rect rect # <<<<<<<<<<<<<< @@ -4227,8 +4309,11 @@ static int __pyx_pf_6pygame_7_sprite_6Sprite_4rect_2__set__(struct __pyx_obj_6py int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 143, __pyx_L1_error) + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 145, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -4301,6 +4386,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_22__reduce_cython__(CYTHON_UN PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -4355,6 +4443,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_24__setstate_cython__(CYTHON_ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -4385,7 +4476,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6Sprite_24__setstate_cython__(CYTHON_ return __pyx_r; } -/* "pygame/_sprite.pyx":302 +/* "pygame/_sprite.pyx":304 * return self._visible * * visible = property(lambda self: self._get_visible(), # <<<<<<<<<<<<<< @@ -4413,9 +4504,12 @@ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda1(CYT PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda1", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4429,7 +4523,7 @@ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda1(CYT } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; @@ -4449,7 +4543,7 @@ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda1(CYT return __pyx_r; } -/* "pygame/_sprite.pyx":303 +/* "pygame/_sprite.pyx":305 * * visible = property(lambda self: self._get_visible(), * lambda self, value: self._set_visible(value), # <<<<<<<<<<<<<< @@ -4463,6 +4557,9 @@ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11DirtySprite_9lambda2 = {"lambda static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_9lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_value = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0); @@ -4489,11 +4586,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_9lambda2(PyObject *__py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, 1); __PYX_ERR(0, 303, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, 1); __PYX_ERR(0, 305, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda2") < 0)) __PYX_ERR(0, 303, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda2") < 0)) __PYX_ERR(0, 305, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4506,7 +4603,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_9lambda2(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 303, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 305, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.DirtySprite.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4525,9 +4622,12 @@ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda2(CYT PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda2", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -4541,7 +4641,7 @@ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda2(CYT } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; @@ -4561,7 +4661,7 @@ static PyObject *__pyx_lambda_funcdef_6pygame_7_sprite_11DirtySprite_lambda2(CYT return __pyx_r; } -/* "pygame/_sprite.pyx":281 +/* "pygame/_sprite.pyx":283 * """ * * def __init__(self, *groups): # <<<<<<<<<<<<<< @@ -4575,6 +4675,9 @@ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11DirtySprite_1__init__ = {"__ini static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_groups = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -4608,7 +4711,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_1__init__(PyObject *__p } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 281, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 283, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -4619,7 +4722,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_1__init__(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 281, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 283, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_groups); __pyx_v_groups = 0; __Pyx_AddTraceback("pygame._sprite.DirtySprite.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -4640,80 +4743,83 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite___init__(CYTHON_UNUSED PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sprite.pyx":283 + /* "pygame/_sprite.pyx":285 * def __init__(self, *groups): * * self.dirty = 1 # <<<<<<<<<<<<<< * self.blendmode = 0 # pygame 1.8, referred to as special_flags in * # the documentation of Surface.blit */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 283, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 285, __pyx_L1_error) - /* "pygame/_sprite.pyx":284 + /* "pygame/_sprite.pyx":286 * * self.dirty = 1 * self.blendmode = 0 # pygame 1.8, referred to as special_flags in # <<<<<<<<<<<<<< * # the documentation of Surface.blit * self._visible = 1 */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blendmode, __pyx_int_0) < 0) __PYX_ERR(0, 284, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_blendmode, __pyx_int_0) < 0) __PYX_ERR(0, 286, __pyx_L1_error) - /* "pygame/_sprite.pyx":286 + /* "pygame/_sprite.pyx":288 * self.blendmode = 0 # pygame 1.8, referred to as special_flags in * # the documentation of Surface.blit * self._visible = 1 # <<<<<<<<<<<<<< * self._layer = getattr(self, '_layer', 0) # Default 0 unless * # initialized differently. */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_visible, __pyx_int_1) < 0) __PYX_ERR(0, 286, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_visible, __pyx_int_1) < 0) __PYX_ERR(0, 288, __pyx_L1_error) - /* "pygame/_sprite.pyx":287 + /* "pygame/_sprite.pyx":289 * # the documentation of Surface.blit * self._visible = 1 * self._layer = getattr(self, '_layer', 0) # Default 0 unless # <<<<<<<<<<<<<< * # initialized differently. * self.source_rect = None */ - __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_self, __pyx_n_s_layer, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_self, __pyx_n_s_layer, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_layer, __pyx_t_1) < 0) __PYX_ERR(0, 287, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_layer, __pyx_t_1) < 0) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":289 + /* "pygame/_sprite.pyx":291 * self._layer = getattr(self, '_layer', 0) # Default 0 unless * # initialized differently. * self.source_rect = None # <<<<<<<<<<<<<< * Sprite.__init__(self, *groups) * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_source_rect, Py_None) < 0) __PYX_ERR(0, 289, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_source_rect, Py_None) < 0) __PYX_ERR(0, 291, __pyx_L1_error) - /* "pygame/_sprite.pyx":290 + /* "pygame/_sprite.pyx":292 * # initialized differently. * self.source_rect = None * Sprite.__init__(self, *groups) # <<<<<<<<<<<<<< * * def _set_visible(self, val): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self); - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":281 + /* "pygame/_sprite.pyx":283 * """ * * def __init__(self, *groups): # <<<<<<<<<<<<<< @@ -4736,7 +4842,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite___init__(CYTHON_UNUSED return __pyx_r; } -/* "pygame/_sprite.pyx":292 +/* "pygame/_sprite.pyx":294 * Sprite.__init__(self, *groups) * * def _set_visible(self, val): # <<<<<<<<<<<<<< @@ -4751,6 +4857,9 @@ static PyMethodDef __pyx_mdef_6pygame_7_sprite_11DirtySprite_3_set_visible = {"_ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_3_set_visible(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_val = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_visible (wrapper)", 0); @@ -4777,11 +4886,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_3_set_visible(PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_set_visible", 1, 2, 2, 1); __PYX_ERR(0, 292, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_set_visible", 1, 2, 2, 1); __PYX_ERR(0, 294, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_visible") < 0)) __PYX_ERR(0, 292, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_visible") < 0)) __PYX_ERR(0, 294, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4794,7 +4903,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_11DirtySprite_3_set_visible(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_set_visible", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 292, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_set_visible", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 294, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.DirtySprite._set_visible", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4813,42 +4922,45 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_2_set_visible(CYTHON_UN PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_visible", 0); - /* "pygame/_sprite.pyx":294 + /* "pygame/_sprite.pyx":296 * def _set_visible(self, val): * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val # <<<<<<<<<<<<<< * if self.dirty < 2: * self.dirty = 1 */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_visible, __pyx_v_val) < 0) __PYX_ERR(0, 294, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_visible, __pyx_v_val) < 0) __PYX_ERR(0, 296, __pyx_L1_error) - /* "pygame/_sprite.pyx":295 + /* "pygame/_sprite.pyx":297 * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val * if self.dirty < 2: # <<<<<<<<<<<<<< * self.dirty = 1 * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dirty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dirty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "pygame/_sprite.pyx":296 + /* "pygame/_sprite.pyx":298 * self._visible = val * if self.dirty < 2: * self.dirty = 1 # <<<<<<<<<<<<<< * * def _get_visible(self): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 296, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 298, __pyx_L1_error) - /* "pygame/_sprite.pyx":295 + /* "pygame/_sprite.pyx":297 * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val * if self.dirty < 2: # <<<<<<<<<<<<<< @@ -4857,7 +4969,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_2_set_visible(CYTHON_UN */ } - /* "pygame/_sprite.pyx":292 + /* "pygame/_sprite.pyx":294 * Sprite.__init__(self, *groups) * * def _set_visible(self, val): # <<<<<<<<<<<<<< @@ -4879,7 +4991,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_2_set_visible(CYTHON_UN return __pyx_r; } -/* "pygame/_sprite.pyx":298 +/* "pygame/_sprite.pyx":300 * self.dirty = 1 * * def _get_visible(self): # <<<<<<<<<<<<<< @@ -4906,9 +5018,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_4_get_visible(CYTHON_UN PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_visible", 0); - /* "pygame/_sprite.pyx":300 + /* "pygame/_sprite.pyx":302 * def _get_visible(self): * """return the visible value of that sprite""" * return self._visible # <<<<<<<<<<<<<< @@ -4916,13 +5031,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_4_get_visible(CYTHON_UN * visible = property(lambda self: self._get_visible(), */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":298 + /* "pygame/_sprite.pyx":300 * self.dirty = 1 * * def _get_visible(self): # <<<<<<<<<<<<<< @@ -4941,7 +5056,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_4_get_visible(CYTHON_UN return __pyx_r; } -/* "pygame/_sprite.pyx":308 +/* "pygame/_sprite.pyx":310 * "assign 0 for invisible and 1 for visible") * * def __repr__(self): # <<<<<<<<<<<<<< @@ -4971,9 +5086,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_6__repr__(CYTHON_UNUSED PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pygame/_sprite.pyx":309 + /* "pygame/_sprite.pyx":311 * * def __repr__(self): * return "<%s DirtySprite(in %d groups)>" % \ # <<<<<<<<<<<<<< @@ -4982,19 +5100,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_6__repr__(CYTHON_UNUSED */ __Pyx_XDECREF(__pyx_r); - /* "pygame/_sprite.pyx":310 + /* "pygame/_sprite.pyx":312 * def __repr__(self): * return "<%s DirtySprite(in %d groups)>" % \ * (self.__class__.__name__, len(self.groups())) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -5008,14 +5126,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_6__repr__(CYTHON_UNUSED } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -5024,21 +5142,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_6__repr__(CYTHON_UNUSED __pyx_t_2 = 0; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":309 + /* "pygame/_sprite.pyx":311 * * def __repr__(self): * return "<%s DirtySprite(in %d groups)>" % \ # <<<<<<<<<<<<<< * (self.__class__.__name__, len(self.groups())) * */ - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_DirtySprite_in_d_groups, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_DirtySprite_in_d_groups, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":308 + /* "pygame/_sprite.pyx":310 * "assign 0 for invisible and 1 for visible") * * def __repr__(self): # <<<<<<<<<<<<<< @@ -5060,7 +5178,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11DirtySprite_6__repr__(CYTHON_UNUSED return __pyx_r; } -/* "pygame/_sprite.pyx":331 +/* "pygame/_sprite.pyx":333 * cdef public list lostsprites * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -5088,16 +5206,19 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup___cinit__(struct __pyx_obj_ int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "pygame/_sprite.pyx":332 + /* "pygame/_sprite.pyx":334 * * def __cinit__(self): * self.spritedict = {} # <<<<<<<<<<<<<< * self.lostsprites = [] * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->spritedict); @@ -5105,14 +5226,14 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup___cinit__(struct __pyx_obj_ __pyx_v_self->spritedict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":333 + /* "pygame/_sprite.pyx":335 * def __cinit__(self): * self.spritedict = {} * self.lostsprites = [] # <<<<<<<<<<<<<< * * cpdef list sprites(self): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->lostsprites); @@ -5120,7 +5241,7 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup___cinit__(struct __pyx_obj_ __pyx_v_self->lostsprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":331 + /* "pygame/_sprite.pyx":333 * cdef public list lostsprites * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -5140,7 +5261,7 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup___cinit__(struct __pyx_obj_ return __pyx_r; } -/* "pygame/_sprite.pyx":335 +/* "pygame/_sprite.pyx":337 * self.lostsprites = [] * * cpdef list sprites(self): # <<<<<<<<<<<<<< @@ -5156,6 +5277,9 @@ static PyObject *__pyx_f_6pygame_7_sprite_13AbstractGroup_sprites(struct __pyx_o PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -5166,7 +5290,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_13AbstractGroup_sprites(struct __pyx_o if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_13AbstractGroup_3sprites)) { __Pyx_XDECREF(__pyx_r); @@ -5183,10 +5307,10 @@ static PyObject *__pyx_f_6pygame_7_sprite_13AbstractGroup_sprites(struct __pyx_o } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 335, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 337, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -5205,7 +5329,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_13AbstractGroup_sprites(struct __pyx_o #endif } - /* "pygame/_sprite.pyx":346 + /* "pygame/_sprite.pyx":348 * * """ * return list(self.spritedict) # <<<<<<<<<<<<<< @@ -5213,13 +5337,13 @@ static PyObject *__pyx_f_6pygame_7_sprite_13AbstractGroup_sprites(struct __pyx_o * cpdef void add_internal(self, sprite): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PySequence_List(__pyx_v_self->spritedict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_v_self->spritedict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":335 + /* "pygame/_sprite.pyx":337 * self.lostsprites = [] * * cpdef list sprites(self): # <<<<<<<<<<<<<< @@ -5259,9 +5383,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_2sprites(struct __pyx PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6pygame_7_sprite_13AbstractGroup_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6pygame_7_sprite_13AbstractGroup_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -5278,7 +5405,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_2sprites(struct __pyx return __pyx_r; } -/* "pygame/_sprite.pyx":348 +/* "pygame/_sprite.pyx":350 * return list(self.spritedict) * * cpdef void add_internal(self, sprite): # <<<<<<<<<<<<<< @@ -5293,6 +5420,9 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal(struct __pyx_o PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -5303,7 +5433,7 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal(struct __pyx_o if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_13AbstractGroup_5add_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -5319,7 +5449,7 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal(struct __pyx_o } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -5339,7 +5469,7 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal(struct __pyx_o #endif } - /* "pygame/_sprite.pyx":349 + /* "pygame/_sprite.pyx":351 * * cpdef void add_internal(self, sprite): * self.spritedict[sprite] = 0 # <<<<<<<<<<<<<< @@ -5348,11 +5478,11 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal(struct __pyx_o */ if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 349, __pyx_L1_error) + __PYX_ERR(0, 351, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->spritedict, __pyx_v_sprite, __pyx_int_0) < 0)) __PYX_ERR(0, 349, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->spritedict, __pyx_v_sprite, __pyx_int_0) < 0)) __PYX_ERR(0, 351, __pyx_L1_error) - /* "pygame/_sprite.pyx":348 + /* "pygame/_sprite.pyx":350 * return list(self.spritedict) * * cpdef void add_internal(self, sprite): # <<<<<<<<<<<<<< @@ -5389,9 +5519,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_4add_internal(struct PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -5408,7 +5541,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_4add_internal(struct return __pyx_r; } -/* "pygame/_sprite.pyx":351 +/* "pygame/_sprite.pyx":353 * self.spritedict[sprite] = 0 * * cpdef void remove_internal(self, sprite): # <<<<<<<<<<<<<< @@ -5426,6 +5559,9 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(struct __py PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -5436,7 +5572,7 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(struct __py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_13AbstractGroup_7remove_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -5452,7 +5588,7 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(struct __py } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -5472,7 +5608,7 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(struct __py #endif } - /* "pygame/_sprite.pyx":352 + /* "pygame/_sprite.pyx":354 * * cpdef void remove_internal(self, sprite): * r = self.spritedict[sprite] # <<<<<<<<<<<<<< @@ -5481,24 +5617,24 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(struct __py */ if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 352, __pyx_L1_error) + __PYX_ERR(0, 354, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->spritedict, __pyx_v_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->spritedict, __pyx_v_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_r = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":353 + /* "pygame/_sprite.pyx":355 * cpdef void remove_internal(self, sprite): * r = self.spritedict[sprite] * if r: # <<<<<<<<<<<<<< * self.lostsprites.append(r) * del self.spritedict[sprite] */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 355, __pyx_L1_error) if (__pyx_t_5) { - /* "pygame/_sprite.pyx":354 + /* "pygame/_sprite.pyx":356 * r = self.spritedict[sprite] * if r: * self.lostsprites.append(r) # <<<<<<<<<<<<<< @@ -5507,11 +5643,11 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(struct __py */ if (unlikely(__pyx_v_self->lostsprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 354, __pyx_L1_error) + __PYX_ERR(0, 356, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->lostsprites, __pyx_v_r); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_self->lostsprites, __pyx_v_r); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 356, __pyx_L1_error) - /* "pygame/_sprite.pyx":353 + /* "pygame/_sprite.pyx":355 * cpdef void remove_internal(self, sprite): * r = self.spritedict[sprite] * if r: # <<<<<<<<<<<<<< @@ -5520,7 +5656,7 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(struct __py */ } - /* "pygame/_sprite.pyx":355 + /* "pygame/_sprite.pyx":357 * if r: * self.lostsprites.append(r) * del self.spritedict[sprite] # <<<<<<<<<<<<<< @@ -5529,11 +5665,11 @@ static void __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(struct __py */ if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 355, __pyx_L1_error) + __PYX_ERR(0, 357, __pyx_L1_error) } - if (unlikely(PyDict_DelItem(__pyx_v_self->spritedict, __pyx_v_sprite) < 0)) __PYX_ERR(0, 355, __pyx_L1_error) + if (unlikely(PyDict_DelItem(__pyx_v_self->spritedict, __pyx_v_sprite) < 0)) __PYX_ERR(0, 357, __pyx_L1_error) - /* "pygame/_sprite.pyx":351 + /* "pygame/_sprite.pyx":353 * self.spritedict[sprite] = 0 * * cpdef void remove_internal(self, sprite): # <<<<<<<<<<<<<< @@ -5571,9 +5707,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_6remove_internal(stru PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -5590,7 +5729,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_6remove_internal(stru return __pyx_r; } -/* "pygame/_sprite.pyx":357 +/* "pygame/_sprite.pyx":359 * del self.spritedict[sprite] * * cpdef bint has_internal(self, sprite): # <<<<<<<<<<<<<< @@ -5607,6 +5746,9 @@ static int __pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal(struct __pyx_ob PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -5617,7 +5759,7 @@ static int __pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal(struct __pyx_ob if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_13AbstractGroup_9has_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -5633,10 +5775,10 @@ static int __pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal(struct __pyx_ob } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -5655,7 +5797,7 @@ static int __pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal(struct __pyx_ob #endif } - /* "pygame/_sprite.pyx":358 + /* "pygame/_sprite.pyx":360 * * cpdef bint has_internal(self, sprite): * return sprite in self.spritedict # <<<<<<<<<<<<<< @@ -5664,13 +5806,13 @@ static int __pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal(struct __pyx_ob */ if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 358, __pyx_L1_error) + __PYX_ERR(0, 360, __pyx_L1_error) } - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_sprite, __pyx_v_self->spritedict, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_sprite, __pyx_v_self->spritedict, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 360, __pyx_L1_error) __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "pygame/_sprite.pyx":357 + /* "pygame/_sprite.pyx":359 * del self.spritedict[sprite] * * cpdef bint has_internal(self, sprite): # <<<<<<<<<<<<<< @@ -5708,9 +5850,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_8has_internal(struct PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -5727,7 +5872,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_8has_internal(struct return __pyx_r; } -/* "pygame/_sprite.pyx":360 +/* "pygame/_sprite.pyx":362 * return sprite in self.spritedict * * def copy(self): # <<<<<<<<<<<<<< @@ -5756,9 +5901,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_10copy(struct __pyx_o PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 0); - /* "pygame/_sprite.pyx":369 + /* "pygame/_sprite.pyx":371 * * """ * return self.__class__(self.sprites()) # <<<<<<<<<<<<<< @@ -5766,9 +5914,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_10copy(struct __pyx_o * def __iter__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5783,14 +5931,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_10copy(struct __pyx_o __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":360 + /* "pygame/_sprite.pyx":362 * return sprite in self.spritedict * * def copy(self): # <<<<<<<<<<<<<< @@ -5812,7 +5960,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_10copy(struct __pyx_o return __pyx_r; } -/* "pygame/_sprite.pyx":371 +/* "pygame/_sprite.pyx":373 * return self.__class__(self.sprites()) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -5838,9 +5986,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_12__iter__(struct __p __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); - /* "pygame/_sprite.pyx":372 + /* "pygame/_sprite.pyx":374 * * def __iter__(self): * return iter(self.sprites()) # <<<<<<<<<<<<<< @@ -5848,16 +5999,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_12__iter__(struct __p * def __contains__(self, sprite): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":371 + /* "pygame/_sprite.pyx":373 * return self.__class__(self.sprites()) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -5877,7 +6028,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_12__iter__(struct __p return __pyx_r; } -/* "pygame/_sprite.pyx":374 +/* "pygame/_sprite.pyx":376 * return iter(self.sprites()) * * def __contains__(self, sprite): # <<<<<<<<<<<<<< @@ -5905,16 +6056,19 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_14__contains__(struct __pyx PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); - /* "pygame/_sprite.pyx":375 + /* "pygame/_sprite.pyx":377 * * def __contains__(self, sprite): * return self.has(sprite) # <<<<<<<<<<<<<< * * def add(self, *sprites): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5928,15 +6082,15 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_14__contains__(struct __pyx } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; goto __pyx_L0; - /* "pygame/_sprite.pyx":374 + /* "pygame/_sprite.pyx":376 * return iter(self.sprites()) * * def __contains__(self, sprite): # <<<<<<<<<<<<<< @@ -5956,7 +6110,7 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_14__contains__(struct __pyx return __pyx_r; } -/* "pygame/_sprite.pyx":377 +/* "pygame/_sprite.pyx":379 * return self.has(sprite) * * def add(self, *sprites): # <<<<<<<<<<<<<< @@ -6005,9 +6159,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob Py_ssize_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); PyObject *__pyx_t_17 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add", 0); - /* "pygame/_sprite.pyx":385 + /* "pygame/_sprite.pyx":387 * * """ * for sprite in sprites: # <<<<<<<<<<<<<< @@ -6018,15 +6175,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 385, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 387, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_sprite, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":389 + /* "pygame/_sprite.pyx":391 * # If this is the case, we should add the sprite itself, * # and not the iterator object. * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< @@ -6037,7 +6194,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":390 + /* "pygame/_sprite.pyx":392 * # and not the iterator object. * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -6047,7 +6204,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob __pyx_t_5 = ((!(((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0) != 0)) != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":391 + /* "pygame/_sprite.pyx":393 * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): * self.add_internal(sprite) # <<<<<<<<<<<<<< @@ -6056,7 +6213,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_sprite, 0); - /* "pygame/_sprite.pyx":392 + /* "pygame/_sprite.pyx":394 * if not self.has_internal(sprite): * self.add_internal(sprite) * (sprite).add_internal(self) # <<<<<<<<<<<<<< @@ -6065,7 +6222,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob */ ((struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *)((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_sprite)->__pyx_vtab)->add_internal(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_sprite), ((PyObject *)__pyx_v_self), 0); - /* "pygame/_sprite.pyx":390 + /* "pygame/_sprite.pyx":392 * # and not the iterator object. * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -6074,7 +6231,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob */ } - /* "pygame/_sprite.pyx":389 + /* "pygame/_sprite.pyx":391 * # If this is the case, we should add the sprite itself, * # and not the iterator object. * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< @@ -6084,7 +6241,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob goto __pyx_L5; } - /* "pygame/_sprite.pyx":394 + /* "pygame/_sprite.pyx":396 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< @@ -6101,24 +6258,24 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "pygame/_sprite.pyx":397 + /* "pygame/_sprite.pyx":399 * # See if sprite is an iterator, like a list or sprite * # group. * self.add(*sprite) # <<<<<<<<<<<<<< * except (TypeError, AttributeError): * # Not iterable. This is probably a sprite that is not an */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L7_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 397, __pyx_L7_error) + __pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 397, __pyx_L7_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 399, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "pygame/_sprite.pyx":394 + /* "pygame/_sprite.pyx":396 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< @@ -6135,7 +6292,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pygame/_sprite.pyx":398 + /* "pygame/_sprite.pyx":400 * # group. * self.add(*sprite) * except (TypeError, AttributeError): # <<<<<<<<<<<<<< @@ -6145,30 +6302,30 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_11) { __Pyx_AddTraceback("pygame._sprite.AbstractGroup.add", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 398, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 400, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_3); - /* "pygame/_sprite.pyx":403 + /* "pygame/_sprite.pyx":405 * # subclass of the Sprite class. Alternately, it could be an * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if not self.has_internal(spr): */ - __pyx_t_5 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 403, __pyx_L9_except_error) + __pyx_t_5 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 405, __pyx_L9_except_error) __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":404 + /* "pygame/_sprite.pyx":406 * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if not self.has_internal(spr): * self.add_internal(spr) */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 404, __pyx_L9_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 406, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { @@ -6182,16 +6339,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob } __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 404, __pyx_L9_except_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 406, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) { __pyx_t_13 = __pyx_t_12; __Pyx_INCREF(__pyx_t_13); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 404, __pyx_L9_except_error) + __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 406, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 404, __pyx_L9_except_error) + __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 406, __pyx_L9_except_error) } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { @@ -6199,17 +6356,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 404, __pyx_L9_except_error) + __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 406, __pyx_L9_except_error) #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 404, __pyx_L9_except_error) + __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 406, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 404, __pyx_L9_except_error) + __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 406, __pyx_L9_except_error) #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 404, __pyx_L9_except_error) + __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 406, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); #endif } @@ -6219,7 +6376,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 404, __pyx_L9_except_error) + else __PYX_ERR(0, 406, __pyx_L9_except_error) } break; } @@ -6228,7 +6385,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_12); __pyx_t_12 = 0; - /* "pygame/_sprite.pyx":405 + /* "pygame/_sprite.pyx":407 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if not self.has_internal(spr): # <<<<<<<<<<<<<< @@ -6238,7 +6395,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob __pyx_t_4 = ((!(((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_spr, 0) != 0)) != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":406 + /* "pygame/_sprite.pyx":408 * for spr in sprite.sprites(): * if not self.has_internal(spr): * self.add_internal(spr) # <<<<<<<<<<<<<< @@ -6247,14 +6404,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_spr, 0); - /* "pygame/_sprite.pyx":407 + /* "pygame/_sprite.pyx":409 * if not self.has_internal(spr): * self.add_internal(spr) * spr.add_internal(self) # <<<<<<<<<<<<<< * elif not self.has_internal(sprite): * self.add_internal(sprite) */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 407, __pyx_L9_except_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 409, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_17 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { @@ -6268,12 +6425,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob } __pyx_t_12 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_17, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_14, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 407, __pyx_L9_except_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 409, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "pygame/_sprite.pyx":405 + /* "pygame/_sprite.pyx":407 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if not self.has_internal(spr): # <<<<<<<<<<<<<< @@ -6282,7 +6439,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob */ } - /* "pygame/_sprite.pyx":404 + /* "pygame/_sprite.pyx":406 * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< @@ -6292,7 +6449,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "pygame/_sprite.pyx":403 + /* "pygame/_sprite.pyx":405 * # subclass of the Sprite class. Alternately, it could be an * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< @@ -6302,7 +6459,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob goto __pyx_L17; } - /* "pygame/_sprite.pyx":408 + /* "pygame/_sprite.pyx":410 * self.add_internal(spr) * spr.add_internal(self) * elif not self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -6312,7 +6469,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob __pyx_t_4 = ((!(((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0) != 0)) != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":409 + /* "pygame/_sprite.pyx":411 * spr.add_internal(self) * elif not self.has_internal(sprite): * self.add_internal(sprite) # <<<<<<<<<<<<<< @@ -6321,14 +6478,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_sprite, 0); - /* "pygame/_sprite.pyx":410 + /* "pygame/_sprite.pyx":412 * elif not self.has_internal(sprite): * self.add_internal(sprite) * sprite.add_internal(self) # <<<<<<<<<<<<<< * * def remove(self, *sprites): */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 410, __pyx_L9_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 412, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -6342,12 +6499,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob } __pyx_t_13 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_12, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 410, __pyx_L9_except_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 412, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "pygame/_sprite.pyx":408 + /* "pygame/_sprite.pyx":410 * self.add_internal(spr) * spr.add_internal(self) * elif not self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -6364,7 +6521,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob goto __pyx_L9_except_error; __pyx_L9_except_error:; - /* "pygame/_sprite.pyx":394 + /* "pygame/_sprite.pyx":396 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< @@ -6386,7 +6543,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob } __pyx_L5:; - /* "pygame/_sprite.pyx":385 + /* "pygame/_sprite.pyx":387 * * """ * for sprite in sprites: # <<<<<<<<<<<<<< @@ -6396,7 +6553,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":377 + /* "pygame/_sprite.pyx":379 * return self.has(sprite) * * def add(self, *sprites): # <<<<<<<<<<<<<< @@ -6426,7 +6583,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_16add(struct __pyx_ob return __pyx_r; } -/* "pygame/_sprite.pyx":412 +/* "pygame/_sprite.pyx":414 * sprite.add_internal(self) * * def remove(self, *sprites): # <<<<<<<<<<<<<< @@ -6475,9 +6632,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx Py_ssize_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); PyObject *__pyx_t_17 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove", 0); - /* "pygame/_sprite.pyx":426 + /* "pygame/_sprite.pyx":428 * # old-style sprite group. Lastly, if that fails, it assumes that the * # normal Sprite methods should be used. * for sprite in sprites: # <<<<<<<<<<<<<< @@ -6488,15 +6648,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 428, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_sprite, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":427 + /* "pygame/_sprite.pyx":429 * # normal Sprite methods should be used. * for sprite in sprites: * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< @@ -6507,7 +6667,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":428 + /* "pygame/_sprite.pyx":430 * for sprite in sprites: * if isinstance(sprite, Sprite): * if self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -6517,7 +6677,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx __pyx_t_5 = (((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0) != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":429 + /* "pygame/_sprite.pyx":431 * if isinstance(sprite, Sprite): * if self.has_internal(sprite): * self.remove_internal(sprite) # <<<<<<<<<<<<<< @@ -6526,14 +6686,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->remove_internal(__pyx_v_self, __pyx_v_sprite, 0); - /* "pygame/_sprite.pyx":430 + /* "pygame/_sprite.pyx":432 * if self.has_internal(sprite): * self.remove_internal(sprite) * sprite.remove_internal(self) # <<<<<<<<<<<<<< * else: * try: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -6547,12 +6707,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":428 + /* "pygame/_sprite.pyx":430 * for sprite in sprites: * if isinstance(sprite, Sprite): * if self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -6561,7 +6721,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx */ } - /* "pygame/_sprite.pyx":427 + /* "pygame/_sprite.pyx":429 * # normal Sprite methods should be used. * for sprite in sprites: * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< @@ -6571,7 +6731,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx goto __pyx_L5; } - /* "pygame/_sprite.pyx":432 + /* "pygame/_sprite.pyx":434 * sprite.remove_internal(self) * else: * try: # <<<<<<<<<<<<<< @@ -6588,24 +6748,24 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "pygame/_sprite.pyx":433 + /* "pygame/_sprite.pyx":435 * else: * try: * self.remove(*sprite) # <<<<<<<<<<<<<< * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 433, __pyx_L7_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 433, __pyx_L7_error) + __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 433, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 435, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":432 + /* "pygame/_sprite.pyx":434 * sprite.remove_internal(self) * else: * try: # <<<<<<<<<<<<<< @@ -6622,7 +6782,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":434 + /* "pygame/_sprite.pyx":436 * try: * self.remove(*sprite) * except (TypeError, AttributeError): # <<<<<<<<<<<<<< @@ -6632,30 +6792,30 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_11) { __Pyx_AddTraceback("pygame._sprite.AbstractGroup.remove", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_3) < 0) __PYX_ERR(0, 434, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_3) < 0) __PYX_ERR(0, 436, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_3); - /* "pygame/_sprite.pyx":435 + /* "pygame/_sprite.pyx":437 * self.remove(*sprite) * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if self.has_internal(spr): */ - __pyx_t_5 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 435, __pyx_L9_except_error) + __pyx_t_5 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 437, __pyx_L9_except_error) __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":436 + /* "pygame/_sprite.pyx":438 * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if self.has_internal(spr): * self.remove_internal(spr) */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 436, __pyx_L9_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 438, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { @@ -6669,16 +6829,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx } __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 436, __pyx_L9_except_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 438, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) { __pyx_t_13 = __pyx_t_12; __Pyx_INCREF(__pyx_t_13); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 436, __pyx_L9_except_error) + __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 438, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 436, __pyx_L9_except_error) + __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 438, __pyx_L9_except_error) } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { @@ -6686,17 +6846,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 436, __pyx_L9_except_error) + __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 438, __pyx_L9_except_error) #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 436, __pyx_L9_except_error) + __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 438, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 436, __pyx_L9_except_error) + __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 438, __pyx_L9_except_error) #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 436, __pyx_L9_except_error) + __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 438, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); #endif } @@ -6706,7 +6866,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 436, __pyx_L9_except_error) + else __PYX_ERR(0, 438, __pyx_L9_except_error) } break; } @@ -6715,7 +6875,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_12); __pyx_t_12 = 0; - /* "pygame/_sprite.pyx":437 + /* "pygame/_sprite.pyx":439 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if self.has_internal(spr): # <<<<<<<<<<<<<< @@ -6725,7 +6885,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx __pyx_t_4 = (((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_spr, 0) != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":438 + /* "pygame/_sprite.pyx":440 * for spr in sprite.sprites(): * if self.has_internal(spr): * self.remove_internal(spr) # <<<<<<<<<<<<<< @@ -6734,14 +6894,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->remove_internal(__pyx_v_self, __pyx_v_spr, 0); - /* "pygame/_sprite.pyx":439 + /* "pygame/_sprite.pyx":441 * if self.has_internal(spr): * self.remove_internal(spr) * spr.remove_internal(self) # <<<<<<<<<<<<<< * elif self.has_internal(sprite): * self.remove_internal(sprite) */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 439, __pyx_L9_except_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 441, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_17 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { @@ -6755,12 +6915,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx } __pyx_t_12 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_17, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_14, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 439, __pyx_L9_except_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 441, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "pygame/_sprite.pyx":437 + /* "pygame/_sprite.pyx":439 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if self.has_internal(spr): # <<<<<<<<<<<<<< @@ -6769,7 +6929,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx */ } - /* "pygame/_sprite.pyx":436 + /* "pygame/_sprite.pyx":438 * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< @@ -6779,7 +6939,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "pygame/_sprite.pyx":435 + /* "pygame/_sprite.pyx":437 * self.remove(*sprite) * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< @@ -6789,7 +6949,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx goto __pyx_L17; } - /* "pygame/_sprite.pyx":440 + /* "pygame/_sprite.pyx":442 * self.remove_internal(spr) * spr.remove_internal(self) * elif self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -6799,7 +6959,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx __pyx_t_4 = (((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0) != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":441 + /* "pygame/_sprite.pyx":443 * spr.remove_internal(self) * elif self.has_internal(sprite): * self.remove_internal(sprite) # <<<<<<<<<<<<<< @@ -6808,14 +6968,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->remove_internal(__pyx_v_self, __pyx_v_sprite, 0); - /* "pygame/_sprite.pyx":442 + /* "pygame/_sprite.pyx":444 * elif self.has_internal(sprite): * self.remove_internal(sprite) * sprite.remove_internal(self) # <<<<<<<<<<<<<< * * def has(self, *sprites): */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 442, __pyx_L9_except_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 444, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -6829,12 +6989,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx } __pyx_t_13 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_14, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_12, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 442, __pyx_L9_except_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 444, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "pygame/_sprite.pyx":440 + /* "pygame/_sprite.pyx":442 * self.remove_internal(spr) * spr.remove_internal(self) * elif self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -6851,7 +7011,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx goto __pyx_L9_except_error; __pyx_L9_except_error:; - /* "pygame/_sprite.pyx":432 + /* "pygame/_sprite.pyx":434 * sprite.remove_internal(self) * else: * try: # <<<<<<<<<<<<<< @@ -6873,7 +7033,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx } __pyx_L5:; - /* "pygame/_sprite.pyx":426 + /* "pygame/_sprite.pyx":428 * # old-style sprite group. Lastly, if that fails, it assumes that the * # normal Sprite methods should be used. * for sprite in sprites: # <<<<<<<<<<<<<< @@ -6883,7 +7043,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":412 + /* "pygame/_sprite.pyx":414 * sprite.add_internal(self) * * def remove(self, *sprites): # <<<<<<<<<<<<<< @@ -6913,7 +7073,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_18remove(struct __pyx return __pyx_r; } -/* "pygame/_sprite.pyx":444 +/* "pygame/_sprite.pyx":446 * sprite.remove_internal(self) * * def has(self, *sprites): # <<<<<<<<<<<<<< @@ -6962,9 +7122,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has", 0); - /* "pygame/_sprite.pyx":454 + /* "pygame/_sprite.pyx":456 * * """ * return_value = False # <<<<<<<<<<<<<< @@ -6973,7 +7136,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob */ __pyx_v_return_value = 0; - /* "pygame/_sprite.pyx":456 + /* "pygame/_sprite.pyx":458 * return_value = False * * for sprite in sprites: # <<<<<<<<<<<<<< @@ -6984,15 +7147,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 458, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_sprite, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":457 + /* "pygame/_sprite.pyx":459 * * for sprite in sprites: * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< @@ -7003,7 +7166,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":459 + /* "pygame/_sprite.pyx":461 * if isinstance(sprite, Sprite): * # Check for Sprite instance's membership in this group * if self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -7013,7 +7176,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob __pyx_t_5 = (((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0) != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":460 + /* "pygame/_sprite.pyx":462 * # Check for Sprite instance's membership in this group * if self.has_internal(sprite): * return_value = True # <<<<<<<<<<<<<< @@ -7022,7 +7185,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob */ __pyx_v_return_value = 1; - /* "pygame/_sprite.pyx":459 + /* "pygame/_sprite.pyx":461 * if isinstance(sprite, Sprite): * # Check for Sprite instance's membership in this group * if self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -7032,7 +7195,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob goto __pyx_L6; } - /* "pygame/_sprite.pyx":462 + /* "pygame/_sprite.pyx":464 * return_value = True * else: * return False # <<<<<<<<<<<<<< @@ -7048,7 +7211,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob } __pyx_L6:; - /* "pygame/_sprite.pyx":457 + /* "pygame/_sprite.pyx":459 * * for sprite in sprites: * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< @@ -7058,7 +7221,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob goto __pyx_L5; } - /* "pygame/_sprite.pyx":464 + /* "pygame/_sprite.pyx":466 * return False * else: * try: # <<<<<<<<<<<<<< @@ -7075,26 +7238,26 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { - /* "pygame/_sprite.pyx":465 + /* "pygame/_sprite.pyx":467 * else: * try: * if self.has(*sprite): # <<<<<<<<<<<<<< * return_value = True * else: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L7_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 467, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 465, __pyx_L7_error) + __pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 467, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 465, __pyx_L7_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 467, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 465, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 467, __pyx_L7_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_5) { - /* "pygame/_sprite.pyx":466 + /* "pygame/_sprite.pyx":468 * try: * if self.has(*sprite): * return_value = True # <<<<<<<<<<<<<< @@ -7103,7 +7266,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob */ __pyx_v_return_value = 1; - /* "pygame/_sprite.pyx":465 + /* "pygame/_sprite.pyx":467 * else: * try: * if self.has(*sprite): # <<<<<<<<<<<<<< @@ -7113,7 +7276,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob goto __pyx_L15; } - /* "pygame/_sprite.pyx":468 + /* "pygame/_sprite.pyx":470 * return_value = True * else: * return False # <<<<<<<<<<<<<< @@ -7129,7 +7292,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob } __pyx_L15:; - /* "pygame/_sprite.pyx":464 + /* "pygame/_sprite.pyx":466 * return False * else: * try: # <<<<<<<<<<<<<< @@ -7146,7 +7309,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pygame/_sprite.pyx":469 + /* "pygame/_sprite.pyx":471 * else: * return False * except (TypeError, AttributeError): # <<<<<<<<<<<<<< @@ -7156,30 +7319,30 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_11) { __Pyx_AddTraceback("pygame._sprite.AbstractGroup.has", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 469, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 471, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_3); - /* "pygame/_sprite.pyx":470 + /* "pygame/_sprite.pyx":472 * return False * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if self.has_internal(spr): */ - __pyx_t_5 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 470, __pyx_L9_except_error) + __pyx_t_5 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 472, __pyx_L9_except_error) __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":471 + /* "pygame/_sprite.pyx":473 * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if self.has_internal(spr): * return_value = True */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 471, __pyx_L9_except_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 473, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { @@ -7193,16 +7356,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob } __pyx_t_12 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 471, __pyx_L9_except_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 473, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) { __pyx_t_13 = __pyx_t_12; __Pyx_INCREF(__pyx_t_13); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 471, __pyx_L9_except_error) + __pyx_t_15 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 473, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 471, __pyx_L9_except_error) + __pyx_t_16 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 473, __pyx_L9_except_error) } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { @@ -7210,17 +7373,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 471, __pyx_L9_except_error) + __pyx_t_12 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 473, __pyx_L9_except_error) #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 471, __pyx_L9_except_error) + __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 473, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 471, __pyx_L9_except_error) + __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 473, __pyx_L9_except_error) #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 471, __pyx_L9_except_error) + __pyx_t_12 = PySequence_ITEM(__pyx_t_13, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 473, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); #endif } @@ -7230,7 +7393,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 471, __pyx_L9_except_error) + else __PYX_ERR(0, 473, __pyx_L9_except_error) } break; } @@ -7239,7 +7402,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_12); __pyx_t_12 = 0; - /* "pygame/_sprite.pyx":472 + /* "pygame/_sprite.pyx":474 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if self.has_internal(spr): # <<<<<<<<<<<<<< @@ -7249,7 +7412,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob __pyx_t_4 = (((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_spr, 0) != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":473 + /* "pygame/_sprite.pyx":475 * for spr in sprite.sprites(): * if self.has_internal(spr): * return_value = True # <<<<<<<<<<<<<< @@ -7258,7 +7421,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob */ __pyx_v_return_value = 1; - /* "pygame/_sprite.pyx":472 + /* "pygame/_sprite.pyx":474 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if self.has_internal(spr): # <<<<<<<<<<<<<< @@ -7268,7 +7431,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob goto __pyx_L21; } - /* "pygame/_sprite.pyx":475 + /* "pygame/_sprite.pyx":477 * return_value = True * else: * return False # <<<<<<<<<<<<<< @@ -7288,7 +7451,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob } __pyx_L21:; - /* "pygame/_sprite.pyx":471 + /* "pygame/_sprite.pyx":473 * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< @@ -7298,7 +7461,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "pygame/_sprite.pyx":470 + /* "pygame/_sprite.pyx":472 * return False * except (TypeError, AttributeError): * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< @@ -7308,7 +7471,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob goto __pyx_L18; } - /* "pygame/_sprite.pyx":477 + /* "pygame/_sprite.pyx":479 * return False * else: * if self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -7319,7 +7482,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob __pyx_t_4 = (((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->has_internal(__pyx_v_self, __pyx_v_sprite, 0) != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":478 + /* "pygame/_sprite.pyx":480 * else: * if self.has_internal(sprite): * return_value = True # <<<<<<<<<<<<<< @@ -7328,7 +7491,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob */ __pyx_v_return_value = 1; - /* "pygame/_sprite.pyx":477 + /* "pygame/_sprite.pyx":479 * return False * else: * if self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -7338,7 +7501,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob goto __pyx_L22; } - /* "pygame/_sprite.pyx":480 + /* "pygame/_sprite.pyx":482 * return_value = True * else: * return False # <<<<<<<<<<<<<< @@ -7366,7 +7529,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob goto __pyx_L9_except_error; __pyx_L9_except_error:; - /* "pygame/_sprite.pyx":464 + /* "pygame/_sprite.pyx":466 * return False * else: * try: # <<<<<<<<<<<<<< @@ -7400,7 +7563,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob } __pyx_L5:; - /* "pygame/_sprite.pyx":456 + /* "pygame/_sprite.pyx":458 * return_value = False * * for sprite in sprites: # <<<<<<<<<<<<<< @@ -7410,7 +7573,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":482 + /* "pygame/_sprite.pyx":484 * return False * * return return_value # <<<<<<<<<<<<<< @@ -7418,13 +7581,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob * def update(self, *args, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_return_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_return_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":444 + /* "pygame/_sprite.pyx":446 * sprite.remove_internal(self) * * def has(self, *sprites): # <<<<<<<<<<<<<< @@ -7451,7 +7614,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_20has(struct __pyx_ob return __pyx_r; } -/* "pygame/_sprite.pyx":484 +/* "pygame/_sprite.pyx":486 * return return_value * * def update(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -7469,12 +7632,8 @@ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_23update(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update (wrapper)", 0); if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "update", 1))) return NULL; - if (unlikely(__pyx_kwds)) { - __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL; - __Pyx_GOTREF(__pyx_v_kwargs); - } else { - __pyx_v_kwargs = NULL; - } + __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; __pyx_r = __pyx_pf_6pygame_7_sprite_13AbstractGroup_22update(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); @@ -7494,49 +7653,56 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_22update(struct __pyx PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update", 0); - /* "pygame/_sprite.pyx":493 + /* "pygame/_sprite.pyx":495 * * """ * for s in self.sprites(): # <<<<<<<<<<<<<< * s.update(*args, **kwargs) * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 493, __pyx_L1_error) + __PYX_ERR(0, 495, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 495, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":494 + /* "pygame/_sprite.pyx":496 * """ * for s in self.sprites(): * s.update(*args, **kwargs) # <<<<<<<<<<<<<< * * def draw(self, surface): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_4 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pygame/_sprite.pyx":493 + /* "pygame/_sprite.pyx":495 * * """ * for s in self.sprites(): # <<<<<<<<<<<<<< @@ -7546,7 +7712,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_22update(struct __pyx } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":484 + /* "pygame/_sprite.pyx":486 * return return_value * * def update(self, *args, **kwargs): # <<<<<<<<<<<<<< @@ -7561,6 +7727,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_22update(struct __pyx __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pygame._sprite.AbstractGroup.update", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -7570,7 +7737,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_22update(struct __pyx return __pyx_r; } -/* "pygame/_sprite.pyx":496 +/* "pygame/_sprite.pyx":498 * s.update(*args, **kwargs) * * def draw(self, surface): # <<<<<<<<<<<<<< @@ -7609,21 +7776,24 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_o PyObject *__pyx_t_7 = NULL; struct __pyx_opt_args_6pygame_5_sdl2_5video_8Renderer_blit __pyx_t_8; int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 0); - /* "pygame/_sprite.pyx":504 + /* "pygame/_sprite.pyx":506 * * """ * cdef list sprites = self.sprites() # <<<<<<<<<<<<<< * cdef object surface_blit * cdef spritedict = self.spritedict */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":506 + /* "pygame/_sprite.pyx":508 * cdef list sprites = self.sprites() * cdef object surface_blit * cdef spritedict = self.spritedict # <<<<<<<<<<<<<< @@ -7635,7 +7805,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_o __pyx_v_spritedict = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":509 + /* "pygame/_sprite.pyx":511 * cdef object ret * * if isinstance(surface, Renderer): # <<<<<<<<<<<<<< @@ -7646,7 +7816,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_o __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "pygame/_sprite.pyx":510 + /* "pygame/_sprite.pyx":512 * * if isinstance(surface, Renderer): * for spr in sprites: # <<<<<<<<<<<<<< @@ -7655,51 +7825,51 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_o */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 510, __pyx_L1_error) + __PYX_ERR(0, 512, __pyx_L1_error) } __pyx_t_1 = __pyx_v_sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 510, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 512, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_5); __pyx_t_5 = 0; - /* "pygame/_sprite.pyx":511 + /* "pygame/_sprite.pyx":513 * if isinstance(surface, Renderer): * for spr in sprites: * ret = (surface).blit(spr.image, spr.rect) # <<<<<<<<<<<<<< * PyDict_SetItem(spritedict, spr, ret) * else: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 511, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 511, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 511, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 513, __pyx_L1_error) __pyx_t_8.__pyx_n = 1; __pyx_t_8.dest = ((pgRectObject *)__pyx_t_6); - __pyx_t_7 = ((struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer *)((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_surface)->__pyx_vtab)->blit(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_surface), __pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 511, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer *)((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_surface)->__pyx_vtab)->blit(((struct __pyx_obj_6pygame_5_sdl2_5video_Renderer *)__pyx_v_surface), __pyx_t_5, 0, &__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_ret, __pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":512 + /* "pygame/_sprite.pyx":514 * for spr in sprites: * ret = (surface).blit(spr.image, spr.rect) * PyDict_SetItem(spritedict, spr, ret) # <<<<<<<<<<<<<< * else: * surface_blit = surface.blit */ - __pyx_t_9 = PyDict_SetItem(__pyx_v_spritedict, __pyx_v_spr, __pyx_v_ret); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_t_9 = PyDict_SetItem(__pyx_v_spritedict, __pyx_v_spr, __pyx_v_ret); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 514, __pyx_L1_error) - /* "pygame/_sprite.pyx":510 + /* "pygame/_sprite.pyx":512 * * if isinstance(surface, Renderer): * for spr in sprites: # <<<<<<<<<<<<<< @@ -7709,7 +7879,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_o } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":509 + /* "pygame/_sprite.pyx":511 * cdef object ret * * if isinstance(surface, Renderer): # <<<<<<<<<<<<<< @@ -7719,7 +7889,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_o goto __pyx_L3; } - /* "pygame/_sprite.pyx":514 + /* "pygame/_sprite.pyx":516 * PyDict_SetItem(spritedict, spr, ret) * else: * surface_blit = surface.blit # <<<<<<<<<<<<<< @@ -7727,12 +7897,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_o * ret = PyObject_CallFunctionObjArgs(surface_blit, */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_surface_blit = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":515 + /* "pygame/_sprite.pyx":517 * else: * surface_blit = surface.blit * for spr in sprites: # <<<<<<<<<<<<<< @@ -7741,64 +7911,64 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_o */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 515, __pyx_L1_error) + __PYX_ERR(0, 517, __pyx_L1_error) } __pyx_t_1 = __pyx_v_sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 515, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 517, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 515, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":517 + /* "pygame/_sprite.pyx":519 * for spr in sprites: * ret = PyObject_CallFunctionObjArgs(surface_blit, * spr.image, # <<<<<<<<<<<<<< * spr.rect, NULL) * PyDict_SetItem(spritedict, spr, ret) */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 517, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - /* "pygame/_sprite.pyx":518 + /* "pygame/_sprite.pyx":520 * ret = PyObject_CallFunctionObjArgs(surface_blit, * spr.image, * spr.rect, NULL) # <<<<<<<<<<<<<< * PyDict_SetItem(spritedict, spr, ret) * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "pygame/_sprite.pyx":516 + /* "pygame/_sprite.pyx":518 * surface_blit = surface.blit * for spr in sprites: * ret = PyObject_CallFunctionObjArgs(surface_blit, # <<<<<<<<<<<<<< * spr.image, * spr.rect, NULL) */ - __pyx_t_5 = PyObject_CallFunctionObjArgs(__pyx_v_surface_blit, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_5 = PyObject_CallFunctionObjArgs(__pyx_v_surface_blit, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_ret, __pyx_t_5); __pyx_t_5 = 0; - /* "pygame/_sprite.pyx":519 + /* "pygame/_sprite.pyx":521 * spr.image, * spr.rect, NULL) * PyDict_SetItem(spritedict, spr, ret) # <<<<<<<<<<<<<< * * self.lostsprites[:] = [] */ - __pyx_t_9 = PyDict_SetItem(__pyx_v_spritedict, __pyx_v_spr, __pyx_v_ret); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 519, __pyx_L1_error) + __pyx_t_9 = PyDict_SetItem(__pyx_v_spritedict, __pyx_v_spr, __pyx_v_ret); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 521, __pyx_L1_error) - /* "pygame/_sprite.pyx":515 + /* "pygame/_sprite.pyx":517 * else: * surface_blit = surface.blit * for spr in sprites: # <<<<<<<<<<<<<< @@ -7810,23 +7980,23 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_o } __pyx_L3:; - /* "pygame/_sprite.pyx":521 + /* "pygame/_sprite.pyx":523 * PyDict_SetItem(spritedict, spr, ret) * * self.lostsprites[:] = [] # <<<<<<<<<<<<<< * * def clear(self, surface, bgd): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->lostsprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 521, __pyx_L1_error) + __PYX_ERR(0, 523, __pyx_L1_error) } - if (__Pyx_PyObject_SetSlice(__pyx_v_self->lostsprites, __pyx_t_1, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 521, __pyx_L1_error) + if (__Pyx_PyObject_SetSlice(__pyx_v_self->lostsprites, __pyx_t_1, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":496 + /* "pygame/_sprite.pyx":498 * s.update(*args, **kwargs) * * def draw(self, surface): # <<<<<<<<<<<<<< @@ -7855,7 +8025,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_24draw(struct __pyx_o return __pyx_r; } -/* "pygame/_sprite.pyx":523 +/* "pygame/_sprite.pyx":525 * self.lostsprites[:] = [] * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< @@ -7869,6 +8039,9 @@ static char __pyx_doc_6pygame_7_sprite_13AbstractGroup_26clear[] = "erase the pr static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_27clear(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_surface = 0; PyObject *__pyx_v_bgd = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear (wrapper)", 0); @@ -7895,11 +8068,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_27clear(PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bgd)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, 1); __PYX_ERR(0, 523, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, 1); __PYX_ERR(0, 525, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clear") < 0)) __PYX_ERR(0, 523, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clear") < 0)) __PYX_ERR(0, 525, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7912,7 +8085,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_13AbstractGroup_27clear(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 523, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 525, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.AbstractGroup.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7939,16 +8112,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear", 0); - /* "pygame/_sprite.pyx":534 + /* "pygame/_sprite.pyx":536 * * """ * if callable(bgd): # <<<<<<<<<<<<<< * for r in self.lostsprites: * bgd(surface, r) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_callable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_callable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -7962,14 +8138,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_bgd) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_bgd); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "pygame/_sprite.pyx":535 + /* "pygame/_sprite.pyx":537 * """ * if callable(bgd): * for r in self.lostsprites: # <<<<<<<<<<<<<< @@ -7978,21 +8154,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ */ if (unlikely(__pyx_v_self->lostsprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 535, __pyx_L1_error) + __PYX_ERR(0, 537, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->lostsprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 535, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 537, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":536 + /* "pygame/_sprite.pyx":538 * if callable(bgd): * for r in self.lostsprites: * bgd(surface, r) # <<<<<<<<<<<<<< @@ -8015,7 +8191,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_surface, __pyx_v_r}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -8023,13 +8199,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_surface, __pyx_v_r}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -8040,14 +8216,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ __Pyx_INCREF(__pyx_v_r); __Pyx_GIVEREF(__pyx_v_r); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_r); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":535 + /* "pygame/_sprite.pyx":537 * """ * if callable(bgd): * for r in self.lostsprites: # <<<<<<<<<<<<<< @@ -8057,7 +8233,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":537 + /* "pygame/_sprite.pyx":539 * for r in self.lostsprites: * bgd(surface, r) * for r in self.spritedict.values(): # <<<<<<<<<<<<<< @@ -8066,17 +8242,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ */ if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 537, __pyx_L1_error) + __PYX_ERR(0, 539, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->spritedict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_self->spritedict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 539, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -8084,17 +8260,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 539, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 539, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -8104,7 +8280,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 537, __pyx_L1_error) + else __PYX_ERR(0, 539, __pyx_L1_error) } break; } @@ -8113,17 +8289,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":538 + /* "pygame/_sprite.pyx":540 * bgd(surface, r) * for r in self.spritedict.values(): * if r: # <<<<<<<<<<<<<< * bgd(surface, r) * else: */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 538, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 540, __pyx_L1_error) if (__pyx_t_4) { - /* "pygame/_sprite.pyx":539 + /* "pygame/_sprite.pyx":541 * for r in self.spritedict.values(): * if r: * bgd(surface, r) # <<<<<<<<<<<<<< @@ -8146,7 +8322,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_surface, __pyx_v_r}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -8154,13 +8330,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_surface, __pyx_v_r}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -8171,14 +8347,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ __Pyx_INCREF(__pyx_v_r); __Pyx_GIVEREF(__pyx_v_r); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_r); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":538 + /* "pygame/_sprite.pyx":540 * bgd(surface, r) * for r in self.spritedict.values(): * if r: # <<<<<<<<<<<<<< @@ -8187,7 +8363,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ */ } - /* "pygame/_sprite.pyx":537 + /* "pygame/_sprite.pyx":539 * for r in self.lostsprites: * bgd(surface, r) * for r in self.spritedict.values(): # <<<<<<<<<<<<<< @@ -8197,7 +8373,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":534 + /* "pygame/_sprite.pyx":536 * * """ * if callable(bgd): # <<<<<<<<<<<<<< @@ -8207,7 +8383,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ goto __pyx_L3; } - /* "pygame/_sprite.pyx":541 + /* "pygame/_sprite.pyx":543 * bgd(surface, r) * else: * surface_blit = surface.blit # <<<<<<<<<<<<<< @@ -8215,12 +8391,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ * surface_blit(bgd, r, r) */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_surface_blit = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":542 + /* "pygame/_sprite.pyx":544 * else: * surface_blit = surface.blit * for r in self.lostsprites: # <<<<<<<<<<<<<< @@ -8229,21 +8405,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ */ if (unlikely(__pyx_v_self->lostsprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 542, __pyx_L1_error) + __PYX_ERR(0, 544, __pyx_L1_error) } __pyx_t_2 = __pyx_v_self->lostsprites; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 542, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 544, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":543 + /* "pygame/_sprite.pyx":545 * surface_blit = surface.blit * for r in self.lostsprites: * surface_blit(bgd, r, r) # <<<<<<<<<<<<<< @@ -8266,7 +8442,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_bgd, __pyx_v_r, __pyx_v_r}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -8274,13 +8450,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_bgd, __pyx_v_r, __pyx_v_r}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -8294,14 +8470,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ __Pyx_INCREF(__pyx_v_r); __Pyx_GIVEREF(__pyx_v_r); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_r); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":542 + /* "pygame/_sprite.pyx":544 * else: * surface_blit = surface.blit * for r in self.lostsprites: # <<<<<<<<<<<<<< @@ -8311,7 +8487,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":544 + /* "pygame/_sprite.pyx":546 * for r in self.lostsprites: * surface_blit(bgd, r, r) * for r in self.spritedict.values(): # <<<<<<<<<<<<<< @@ -8320,17 +8496,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ */ if (unlikely(__pyx_v_self->spritedict == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 544, __pyx_L1_error) + __PYX_ERR(0, 546, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_Values(__pyx_v_self->spritedict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_Values(__pyx_v_self->spritedict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 546, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -8338,17 +8514,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 546, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 546, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -8358,7 +8534,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 544, __pyx_L1_error) + else __PYX_ERR(0, 546, __pyx_L1_error) } break; } @@ -8367,17 +8543,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":545 + /* "pygame/_sprite.pyx":547 * surface_blit(bgd, r, r) * for r in self.spritedict.values(): * if r: # <<<<<<<<<<<<<< * surface_blit(bgd, r, r) * */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 545, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 547, __pyx_L1_error) if (__pyx_t_4) { - /* "pygame/_sprite.pyx":546 + /* "pygame/_sprite.pyx":548 * for r in self.spritedict.values(): * if r: * surface_blit(bgd, r, r) # <<<<<<<<<<<<<< @@ -8400,7 +8576,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_bgd, __pyx_v_r, __pyx_v_r}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -8408,13 +8584,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_v_bgd, __pyx_v_r, __pyx_v_r}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -8428,14 +8604,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ __Pyx_INCREF(__pyx_v_r); __Pyx_GIVEREF(__pyx_v_r); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_v_r); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":545 + /* "pygame/_sprite.pyx":547 * surface_blit(bgd, r, r) * for r in self.spritedict.values(): * if r: # <<<<<<<<<<<<<< @@ -8444,7 +8620,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ */ } - /* "pygame/_sprite.pyx":544 + /* "pygame/_sprite.pyx":546 * for r in self.lostsprites: * surface_blit(bgd, r, r) * for r in self.spritedict.values(): # <<<<<<<<<<<<<< @@ -8456,7 +8632,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ } __pyx_L3:; - /* "pygame/_sprite.pyx":523 + /* "pygame/_sprite.pyx":525 * self.lostsprites[:] = [] * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< @@ -8483,7 +8659,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_26clear(struct __pyx_ return __pyx_r; } -/* "pygame/_sprite.pyx":548 +/* "pygame/_sprite.pyx":550 * surface_blit(bgd, r, r) * * def empty(self): # <<<<<<<<<<<<<< @@ -8514,35 +8690,38 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_28empty(struct __pyx_ Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("empty", 0); - /* "pygame/_sprite.pyx":556 + /* "pygame/_sprite.pyx":558 * * """ * for s in self.sprites(): # <<<<<<<<<<<<<< * self.remove_internal(s) * s.remove_internal(self) */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 556, __pyx_L1_error) + __PYX_ERR(0, 558, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 558, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":557 + /* "pygame/_sprite.pyx":559 * """ * for s in self.sprites(): * self.remove_internal(s) # <<<<<<<<<<<<<< @@ -8551,14 +8730,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_28empty(struct __pyx_ */ ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->remove_internal(__pyx_v_self, __pyx_v_s, 0); - /* "pygame/_sprite.pyx":558 + /* "pygame/_sprite.pyx":560 * for s in self.sprites(): * self.remove_internal(s) * s.remove_internal(self) # <<<<<<<<<<<<<< * * def __nonzero__(self): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -8572,12 +8751,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_28empty(struct __pyx_ } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":556 + /* "pygame/_sprite.pyx":558 * * """ * for s in self.sprites(): # <<<<<<<<<<<<<< @@ -8587,7 +8766,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_28empty(struct __pyx_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":548 + /* "pygame/_sprite.pyx":550 * surface_blit(bgd, r, r) * * def empty(self): # <<<<<<<<<<<<<< @@ -8612,7 +8791,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_28empty(struct __pyx_ return __pyx_r; } -/* "pygame/_sprite.pyx":560 +/* "pygame/_sprite.pyx":562 * s.remove_internal(self) * * def __nonzero__(self): # <<<<<<<<<<<<<< @@ -8641,18 +8820,21 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_30__nonzero__(struct __pyx_ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__nonzero__", 0); - /* "pygame/_sprite.pyx":561 + /* "pygame/_sprite.pyx":563 * * def __nonzero__(self): * return truth(self.sprites()) # <<<<<<<<<<<<<< * * def __len__(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_truth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_truth); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -8667,15 +8849,15 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_30__nonzero__(struct __pyx_ __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "pygame/_sprite.pyx":560 + /* "pygame/_sprite.pyx":562 * s.remove_internal(self) * * def __nonzero__(self): # <<<<<<<<<<<<<< @@ -8696,7 +8878,7 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_30__nonzero__(struct __pyx_ return __pyx_r; } -/* "pygame/_sprite.pyx":563 +/* "pygame/_sprite.pyx":565 * return truth(self.sprites()) * * def __len__(self): # <<<<<<<<<<<<<< @@ -8726,27 +8908,30 @@ static Py_ssize_t __pyx_pf_6pygame_7_sprite_13AbstractGroup_32__len__(struct __p __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__len__", 0); - /* "pygame/_sprite.pyx":571 + /* "pygame/_sprite.pyx":573 * * """ * return len(self.sprites()) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_AbstractGroup *)__pyx_v_self->__pyx_vtab)->sprites(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 571, __pyx_L1_error) + __PYX_ERR(0, 573, __pyx_L1_error) } - __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "pygame/_sprite.pyx":563 + /* "pygame/_sprite.pyx":565 * return truth(self.sprites()) * * def __len__(self): # <<<<<<<<<<<<<< @@ -8764,7 +8949,7 @@ static Py_ssize_t __pyx_pf_6pygame_7_sprite_13AbstractGroup_32__len__(struct __p return __pyx_r; } -/* "pygame/_sprite.pyx":573 +/* "pygame/_sprite.pyx":575 * return len(self.sprites()) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -8792,9 +8977,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_34__repr__(struct __p PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "pygame/_sprite.pyx":574 + /* "pygame/_sprite.pyx":576 * * def __repr__(self): * return "<%s(%d sprites)>" % (self.__class__.__name__, len(self)) # <<<<<<<<<<<<<< @@ -8802,15 +8990,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_34__repr__(struct __p * cdef class Group(AbstractGroup): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 574, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 576, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -8818,14 +9006,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_34__repr__(struct __p PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_d_sprites, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_d_sprites, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":573 + /* "pygame/_sprite.pyx":575 * return len(self.sprites()) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -8846,7 +9034,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_34__repr__(struct __p return __pyx_r; } -/* "pygame/_sprite.pyx":328 +/* "pygame/_sprite.pyx":330 * _spritegroup = True * * cdef public dict spritedict # <<<<<<<<<<<<<< @@ -8900,8 +9088,11 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict_2__set__(struc int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 328, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 330, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -8951,7 +9142,7 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_10spritedict_4__del__(struc return __pyx_r; } -/* "pygame/_sprite.pyx":329 +/* "pygame/_sprite.pyx":331 * * cdef public dict spritedict * cdef public list lostsprites # <<<<<<<<<<<<<< @@ -9005,8 +9196,11 @@ static int __pyx_pf_6pygame_7_sprite_13AbstractGroup_11lostsprites_2__set__(stru int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 329, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 331, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -9079,6 +9273,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_36__reduce_cython__(C PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -9133,6 +9330,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_38__setstate_cython__ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -9163,7 +9363,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13AbstractGroup_38__setstate_cython__ return __pyx_r; } -/* "pygame/_sprite.pyx":595 +/* "pygame/_sprite.pyx":597 * * """ * def __init__(self, *sprites): # <<<<<<<<<<<<<< @@ -9195,16 +9395,19 @@ static int __pyx_pf_6pygame_7_sprite_5Group___init__(struct __pyx_obj_6pygame_7_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sprite.pyx":596 + /* "pygame/_sprite.pyx":598 * """ * def __init__(self, *sprites): * AbstractGroup.__init__(self) # <<<<<<<<<<<<<< * self.add(*sprites) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9218,26 +9421,26 @@ static int __pyx_pf_6pygame_7_sprite_5Group___init__(struct __pyx_obj_6pygame_7_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":597 + /* "pygame/_sprite.pyx":599 * def __init__(self, *sprites): * AbstractGroup.__init__(self) * self.add(*sprites) # <<<<<<<<<<<<<< * * RenderPlain = Group */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_sprites, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_sprites, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":595 + /* "pygame/_sprite.pyx":597 * * """ * def __init__(self, *sprites): # <<<<<<<<<<<<<< @@ -9282,6 +9485,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_5Group_2__reduce_cython__(CYTHON_UNUS PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -9336,6 +9542,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_5Group_4__setstate_cython__(CYTHON_UN PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -9366,7 +9575,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_5Group_4__setstate_cython__(CYTHON_UN return __pyx_r; } -/* "pygame/_sprite.pyx":611 +/* "pygame/_sprite.pyx":613 * * """ * def draw(self, surface): # <<<<<<<<<<<<<< @@ -9408,9 +9617,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 0); - /* "pygame/_sprite.pyx":612 + /* "pygame/_sprite.pyx":614 * """ * def draw(self, surface): * spritedict = self.spritedict # <<<<<<<<<<<<<< @@ -9422,19 +9634,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj __pyx_v_spritedict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":613 + /* "pygame/_sprite.pyx":615 * def draw(self, surface): * spritedict = self.spritedict * surface_blit = surface.blit # <<<<<<<<<<<<<< * dirty = self.lostsprites * self.lostsprites.clear() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_surface_blit = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":614 + /* "pygame/_sprite.pyx":616 * spritedict = self.spritedict * surface_blit = surface.blit * dirty = self.lostsprites # <<<<<<<<<<<<<< @@ -9446,14 +9658,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj __pyx_v_dirty = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":615 + /* "pygame/_sprite.pyx":617 * surface_blit = surface.blit * dirty = self.lostsprites * self.lostsprites.clear() # <<<<<<<<<<<<<< * dirty_append = dirty.append * for s in self.sprites(): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.lostsprites, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.__pyx_base.lostsprites, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9467,50 +9679,50 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":616 + /* "pygame/_sprite.pyx":618 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * for s in self.sprites(): * r = spritedict[s] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirty, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirty, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_dirty_append = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":617 + /* "pygame/_sprite.pyx":619 * self.lostsprites.clear() * dirty_append = dirty.append * for s in self.sprites(): # <<<<<<<<<<<<<< * r = spritedict[s] * newrect = surface_blit(s.image, s.rect) */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_RenderUpdates *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.sprites(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_RenderUpdates *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.sprites(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 617, __pyx_L1_error) + __PYX_ERR(0, 619, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 619, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":618 + /* "pygame/_sprite.pyx":620 * dirty_append = dirty.append * for s in self.sprites(): * r = spritedict[s] # <<<<<<<<<<<<<< @@ -9519,23 +9731,23 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj */ if (unlikely(__pyx_v_spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 618, __pyx_L1_error) + __PYX_ERR(0, 620, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_spritedict, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_spritedict, __pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":619 + /* "pygame/_sprite.pyx":621 * for s in self.sprites(): * r = spritedict[s] * newrect = surface_blit(s.image, s.rect) # <<<<<<<<<<<<<< * if r: * if newrect.colliderect(r): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_surface_blit); __pyx_t_6 = __pyx_v_surface_blit; __pyx_t_7 = NULL; @@ -9553,7 +9765,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -9563,7 +9775,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -9571,7 +9783,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -9582,7 +9794,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -9590,24 +9802,24 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj __Pyx_XDECREF_SET(__pyx_v_newrect, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":620 + /* "pygame/_sprite.pyx":622 * r = spritedict[s] * newrect = surface_blit(s.image, s.rect) * if r: # <<<<<<<<<<<<<< * if newrect.colliderect(r): * dirty_append(newrect.union(r)) */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 620, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_r); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 622, __pyx_L1_error) if (__pyx_t_10) { - /* "pygame/_sprite.pyx":621 + /* "pygame/_sprite.pyx":623 * newrect = surface_blit(s.image, s.rect) * if r: * if newrect.colliderect(r): # <<<<<<<<<<<<<< * dirty_append(newrect.union(r)) * else: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -9621,14 +9833,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_v_r) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_r); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 621, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { - /* "pygame/_sprite.pyx":616 + /* "pygame/_sprite.pyx":618 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< @@ -9637,17 +9849,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 616, __pyx_L1_error) + __PYX_ERR(0, 618, __pyx_L1_error) } - /* "pygame/_sprite.pyx":622 + /* "pygame/_sprite.pyx":624 * if r: * if newrect.colliderect(r): * dirty_append(newrect.union(r)) # <<<<<<<<<<<<<< * else: * dirty_append(newrect) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_union); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_union); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -9661,13 +9873,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_v_r) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_r); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":621 + /* "pygame/_sprite.pyx":623 * newrect = surface_blit(s.image, s.rect) * if r: * if newrect.colliderect(r): # <<<<<<<<<<<<<< @@ -9677,7 +9889,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj goto __pyx_L6; } - /* "pygame/_sprite.pyx":624 + /* "pygame/_sprite.pyx":626 * dirty_append(newrect.union(r)) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< @@ -9686,7 +9898,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj */ /*else*/ { - /* "pygame/_sprite.pyx":616 + /* "pygame/_sprite.pyx":618 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< @@ -9695,19 +9907,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 616, __pyx_L1_error) + __PYX_ERR(0, 618, __pyx_L1_error) } - /* "pygame/_sprite.pyx":624 + /* "pygame/_sprite.pyx":626 * dirty_append(newrect.union(r)) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< * dirty_append(r) * else: */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 626, __pyx_L1_error) - /* "pygame/_sprite.pyx":616 + /* "pygame/_sprite.pyx":618 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< @@ -9716,21 +9928,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 616, __pyx_L1_error) + __PYX_ERR(0, 618, __pyx_L1_error) } - /* "pygame/_sprite.pyx":625 + /* "pygame/_sprite.pyx":627 * else: * dirty_append(newrect) * dirty_append(r) # <<<<<<<<<<<<<< * else: * dirty_append(newrect) */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_r); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 625, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_r); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 627, __pyx_L1_error) } __pyx_L6:; - /* "pygame/_sprite.pyx":620 + /* "pygame/_sprite.pyx":622 * r = spritedict[s] * newrect = surface_blit(s.image, s.rect) * if r: # <<<<<<<<<<<<<< @@ -9740,7 +9952,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj goto __pyx_L5; } - /* "pygame/_sprite.pyx":627 + /* "pygame/_sprite.pyx":629 * dirty_append(r) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< @@ -9749,7 +9961,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj */ /*else*/ { - /* "pygame/_sprite.pyx":616 + /* "pygame/_sprite.pyx":618 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< @@ -9758,21 +9970,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 616, __pyx_L1_error) + __PYX_ERR(0, 618, __pyx_L1_error) } - /* "pygame/_sprite.pyx":627 + /* "pygame/_sprite.pyx":629 * dirty_append(r) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< * spritedict[s] = newrect * return dirty */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 629, __pyx_L1_error) } __pyx_L5:; - /* "pygame/_sprite.pyx":628 + /* "pygame/_sprite.pyx":630 * else: * dirty_append(newrect) * spritedict[s] = newrect # <<<<<<<<<<<<<< @@ -9781,11 +9993,11 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj */ if (unlikely(__pyx_v_spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 628, __pyx_L1_error) + __PYX_ERR(0, 630, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_spritedict, __pyx_v_s, __pyx_v_newrect) < 0)) __PYX_ERR(0, 628, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_spritedict, __pyx_v_s, __pyx_v_newrect) < 0)) __PYX_ERR(0, 630, __pyx_L1_error) - /* "pygame/_sprite.pyx":617 + /* "pygame/_sprite.pyx":619 * self.lostsprites.clear() * dirty_append = dirty.append * for s in self.sprites(): # <<<<<<<<<<<<<< @@ -9795,7 +10007,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":629 + /* "pygame/_sprite.pyx":631 * dirty_append(newrect) * spritedict[s] = newrect * return dirty # <<<<<<<<<<<<<< @@ -9807,7 +10019,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_draw(struct __pyx_obj __pyx_r = __pyx_v_dirty; goto __pyx_L0; - /* "pygame/_sprite.pyx":611 + /* "pygame/_sprite.pyx":613 * * """ * def draw(self, surface): # <<<<<<<<<<<<<< @@ -9862,6 +10074,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_2__reduce_cython__(CY PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -9916,6 +10131,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_4__setstate_cython__( PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -9946,7 +10164,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_13RenderUpdates_4__setstate_cython__( return __pyx_r; } -/* "pygame/_sprite.pyx":645 +/* "pygame/_sprite.pyx":647 * cdef public list _spritelist * * def __init__(self, *sprites): # <<<<<<<<<<<<<< @@ -9978,16 +10196,19 @@ static int __pyx_pf_6pygame_7_sprite_14OrderedUpdates___init__(struct __pyx_obj_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sprite.pyx":646 + /* "pygame/_sprite.pyx":648 * * def __init__(self, *sprites): * self._spritelist = [] # <<<<<<<<<<<<<< * RenderUpdates.__init__(self, *sprites) * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_spritelist); @@ -9995,30 +10216,30 @@ static int __pyx_pf_6pygame_7_sprite_14OrderedUpdates___init__(struct __pyx_obj_ __pyx_v_self->_spritelist = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":647 + /* "pygame/_sprite.pyx":649 * def __init__(self, *sprites): * self._spritelist = [] * RenderUpdates.__init__(self, *sprites) # <<<<<<<<<<<<<< * * cpdef list sprites(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_RenderUpdates), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_RenderUpdates), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":645 + /* "pygame/_sprite.pyx":647 * cdef public list _spritelist * * def __init__(self, *sprites): # <<<<<<<<<<<<<< @@ -10040,7 +10261,7 @@ static int __pyx_pf_6pygame_7_sprite_14OrderedUpdates___init__(struct __pyx_obj_ return __pyx_r; } -/* "pygame/_sprite.pyx":649 +/* "pygame/_sprite.pyx":651 * RenderUpdates.__init__(self, *sprites) * * cpdef list sprites(self): # <<<<<<<<<<<<<< @@ -10056,6 +10277,9 @@ static PyObject *__pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites(struct __pyx_ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -10066,7 +10290,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites(struct __pyx_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_3sprites)) { __Pyx_XDECREF(__pyx_r); @@ -10083,10 +10307,10 @@ static PyObject *__pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites(struct __pyx_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 649, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 651, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -10105,7 +10329,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites(struct __pyx_ #endif } - /* "pygame/_sprite.pyx":650 + /* "pygame/_sprite.pyx":652 * * cpdef list sprites(self): * return list(self._spritelist) # <<<<<<<<<<<<<< @@ -10113,13 +10337,13 @@ static PyObject *__pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites(struct __pyx_ * cpdef void add_internal(self, sprite): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PySequence_List(__pyx_v_self->_spritelist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_v_self->_spritelist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":649 + /* "pygame/_sprite.pyx":651 * RenderUpdates.__init__(self, *sprites) * * cpdef list sprites(self): # <<<<<<<<<<<<<< @@ -10158,9 +10382,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_2sprites(struct __py PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6pygame_7_sprite_14OrderedUpdates_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10177,7 +10404,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_2sprites(struct __py return __pyx_r; } -/* "pygame/_sprite.pyx":652 +/* "pygame/_sprite.pyx":654 * return list(self._spritelist) * * cpdef void add_internal(self, sprite): # <<<<<<<<<<<<<< @@ -10193,6 +10420,9 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(struct __pyx_ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -10203,7 +10433,7 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(struct __pyx_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_5add_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -10219,7 +10449,7 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(struct __pyx_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -10239,7 +10469,7 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(struct __pyx_ #endif } - /* "pygame/_sprite.pyx":653 + /* "pygame/_sprite.pyx":655 * * cpdef void add_internal(self, sprite): * RenderUpdates.add_internal(self, sprite) # <<<<<<<<<<<<<< @@ -10248,7 +10478,7 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(struct __pyx_ */ __pyx_vtabptr_6pygame_7_sprite_RenderUpdates->__pyx_base.__pyx_base.add_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 1); - /* "pygame/_sprite.pyx":654 + /* "pygame/_sprite.pyx":656 * cpdef void add_internal(self, sprite): * RenderUpdates.add_internal(self, sprite) * self._spritelist.append(sprite) # <<<<<<<<<<<<<< @@ -10257,11 +10487,11 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(struct __pyx_ */ if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 654, __pyx_L1_error) + __PYX_ERR(0, 656, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->_spritelist, __pyx_v_sprite); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 654, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->_spritelist, __pyx_v_sprite); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 656, __pyx_L1_error) - /* "pygame/_sprite.pyx":652 + /* "pygame/_sprite.pyx":654 * return list(self._spritelist) * * cpdef void add_internal(self, sprite): # <<<<<<<<<<<<<< @@ -10298,9 +10528,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_4add_internal(struct PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10317,7 +10550,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_4add_internal(struct return __pyx_r; } -/* "pygame/_sprite.pyx":656 +/* "pygame/_sprite.pyx":658 * self._spritelist.append(sprite) * * cpdef void remove_internal(self, sprite): # <<<<<<<<<<<<<< @@ -10332,6 +10565,9 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(struct __p PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -10342,7 +10578,7 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(struct __p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_14OrderedUpdates_7remove_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -10358,7 +10594,7 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(struct __p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -10378,7 +10614,7 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(struct __p #endif } - /* "pygame/_sprite.pyx":657 + /* "pygame/_sprite.pyx":659 * * cpdef void remove_internal(self, sprite): * RenderUpdates.remove_internal(self, sprite) # <<<<<<<<<<<<<< @@ -10387,14 +10623,14 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(struct __p */ __pyx_vtabptr_6pygame_7_sprite_RenderUpdates->__pyx_base.__pyx_base.remove_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 1); - /* "pygame/_sprite.pyx":658 + /* "pygame/_sprite.pyx":660 * cpdef void remove_internal(self, sprite): * RenderUpdates.remove_internal(self, sprite) * self._spritelist.remove(sprite) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_spritelist, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_spritelist, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10408,12 +10644,12 @@ static void __pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(struct __p } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":656 + /* "pygame/_sprite.pyx":658 * self._spritelist.append(sprite) * * cpdef void remove_internal(self, sprite): # <<<<<<<<<<<<<< @@ -10450,9 +10686,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_6remove_internal(str PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10469,7 +10708,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_6remove_internal(str return __pyx_r; } -/* "pygame/_sprite.pyx":643 +/* "pygame/_sprite.pyx":645 * """ * * cdef public list _spritelist # <<<<<<<<<<<<<< @@ -10523,8 +10762,11 @@ static int __pyx_pf_6pygame_7_sprite_14OrderedUpdates_11_spritelist_2__set__(str int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 643, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 645, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -10597,6 +10839,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_8__reduce_cython__(C PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -10651,6 +10896,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_10__setstate_cython_ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -10681,7 +10929,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14OrderedUpdates_10__setstate_cython_ return __pyx_r; } -/* "pygame/_sprite.pyx":677 +/* "pygame/_sprite.pyx":679 * cdef public int _default_layer * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -10709,16 +10957,19 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates___cinit__(struct __pyx_obj int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "pygame/_sprite.pyx":678 + /* "pygame/_sprite.pyx":680 * * def __cinit__(self): * self._spritelayers = {} # <<<<<<<<<<<<<< * self._spritelist = [] * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_spritelayers); @@ -10726,14 +10977,14 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates___cinit__(struct __pyx_obj __pyx_v_self->_spritelayers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":679 + /* "pygame/_sprite.pyx":681 * def __cinit__(self): * self._spritelayers = {} * self._spritelist = [] # <<<<<<<<<<<<<< * * def __init__(self, *sprites, **kwargs): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_spritelist); @@ -10741,7 +10992,7 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates___cinit__(struct __pyx_obj __pyx_v_self->_spritelist = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":677 + /* "pygame/_sprite.pyx":679 * cdef public int _default_layer * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -10761,7 +11012,7 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates___cinit__(struct __pyx_obj return __pyx_r; } -/* "pygame/_sprite.pyx":681 +/* "pygame/_sprite.pyx":683 * self._spritelist = [] * * def __init__(self, *sprites, **kwargs): # <<<<<<<<<<<<<< @@ -10802,16 +11053,19 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_2__init__(struct __pyx_obj PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sprite.pyx":694 + /* "pygame/_sprite.pyx":696 * * """ * AbstractGroup.__init__(self) # <<<<<<<<<<<<<< * self._default_layer = kwargs.get('default_layer', 0) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10825,39 +11079,42 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_2__init__(struct __pyx_obj } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":695 + /* "pygame/_sprite.pyx":697 * """ * AbstractGroup.__init__(self) * self._default_layer = kwargs.get('default_layer', 0) # <<<<<<<<<<<<<< * * self.add(*sprites, **kwargs) */ - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_default_layer, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwargs, __pyx_n_s_default_layer, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->_default_layer = __pyx_t_4; - /* "pygame/_sprite.pyx":697 + /* "pygame/_sprite.pyx":699 * self._default_layer = kwargs.get('default_layer', 0) * * self.add(*sprites, **kwargs) # <<<<<<<<<<<<<< * * cpdef void add_internal(self, sprite, layer=None): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_sprites, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_sprites, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":681 + /* "pygame/_sprite.pyx":683 * self._spritelist = [] * * def __init__(self, *sprites, **kwargs): # <<<<<<<<<<<<<< @@ -10879,7 +11136,7 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_2__init__(struct __pyx_obj return __pyx_r; } -/* "pygame/_sprite.pyx":699 +/* "pygame/_sprite.pyx":701 * self.add(*sprites, **kwargs) * * cpdef void add_internal(self, sprite, layer=None): # <<<<<<<<<<<<<< @@ -10910,6 +11167,9 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { @@ -10926,7 +11186,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_5add_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -10945,7 +11205,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sprite, __pyx_v_layer}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -10953,13 +11213,13 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sprite, __pyx_v_layer}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -10970,7 +11230,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py __Pyx_INCREF(__pyx_v_layer); __Pyx_GIVEREF(__pyx_v_layer); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_layer); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -10992,23 +11252,23 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py #endif } - /* "pygame/_sprite.pyx":705 + /* "pygame/_sprite.pyx":707 * * """ * self.spritedict[sprite] = self._init_rect # <<<<<<<<<<<<<< * * if layer is None: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->__pyx_base.spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 705, __pyx_L1_error) + __PYX_ERR(0, 707, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx_base.spritedict, __pyx_v_sprite, __pyx_t_1) < 0)) __PYX_ERR(0, 705, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->__pyx_base.spritedict, __pyx_v_sprite, __pyx_t_1) < 0)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":707 + /* "pygame/_sprite.pyx":709 * self.spritedict[sprite] = self._init_rect * * if layer is None: # <<<<<<<<<<<<<< @@ -11019,7 +11279,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "pygame/_sprite.pyx":708 + /* "pygame/_sprite.pyx":710 * * if layer is None: * try: # <<<<<<<<<<<<<< @@ -11035,19 +11295,19 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { - /* "pygame/_sprite.pyx":709 + /* "pygame/_sprite.pyx":711 * if layer is None: * try: * layer = sprite._layer # <<<<<<<<<<<<<< * except AttributeError: * layer = sprite._layer = self._default_layer */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L4_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_layer, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":708 + /* "pygame/_sprite.pyx":710 * * if layer is None: * try: # <<<<<<<<<<<<<< @@ -11066,7 +11326,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "pygame/_sprite.pyx":710 + /* "pygame/_sprite.pyx":712 * try: * layer = sprite._layer * except AttributeError: # <<<<<<<<<<<<<< @@ -11076,23 +11336,23 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_5) { __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 710, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 712, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); - /* "pygame/_sprite.pyx":711 + /* "pygame/_sprite.pyx":713 * layer = sprite._layer * except AttributeError: * layer = sprite._layer = self._default_layer # <<<<<<<<<<<<<< * elif hasattr(sprite, '_layer'): * sprite._layer = layer */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_default_layer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 711, __pyx_L6_except_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->_default_layer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 713, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_layer, __pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_layer, __pyx_t_6) < 0) __PYX_ERR(0, 711, __pyx_L6_except_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_layer, __pyx_t_6) < 0) __PYX_ERR(0, 713, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -11102,7 +11362,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "pygame/_sprite.pyx":708 + /* "pygame/_sprite.pyx":710 * * if layer is None: * try: # <<<<<<<<<<<<<< @@ -11122,7 +11382,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py __pyx_L9_try_end:; } - /* "pygame/_sprite.pyx":707 + /* "pygame/_sprite.pyx":709 * self.spritedict[sprite] = self._init_rect * * if layer is None: # <<<<<<<<<<<<<< @@ -11132,27 +11392,27 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py goto __pyx_L3; } - /* "pygame/_sprite.pyx":712 + /* "pygame/_sprite.pyx":714 * except AttributeError: * layer = sprite._layer = self._default_layer * elif hasattr(sprite, '_layer'): # <<<<<<<<<<<<<< * sprite._layer = layer * */ - __pyx_t_8 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_layer); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 712, __pyx_L1_error) + __pyx_t_8 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_layer); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 714, __pyx_L1_error) __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "pygame/_sprite.pyx":713 + /* "pygame/_sprite.pyx":715 * layer = sprite._layer = self._default_layer * elif hasattr(sprite, '_layer'): * sprite._layer = layer # <<<<<<<<<<<<<< * * sprites = self._spritelist # speedup */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_layer, __pyx_v_layer) < 0) __PYX_ERR(0, 713, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_layer, __pyx_v_layer) < 0) __PYX_ERR(0, 715, __pyx_L1_error) - /* "pygame/_sprite.pyx":712 + /* "pygame/_sprite.pyx":714 * except AttributeError: * layer = sprite._layer = self._default_layer * elif hasattr(sprite, '_layer'): # <<<<<<<<<<<<<< @@ -11162,7 +11422,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py } __pyx_L3:; - /* "pygame/_sprite.pyx":715 + /* "pygame/_sprite.pyx":717 * sprite._layer = layer * * sprites = self._spritelist # speedup # <<<<<<<<<<<<<< @@ -11174,7 +11434,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py __pyx_v_sprites = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":716 + /* "pygame/_sprite.pyx":718 * * sprites = self._spritelist # speedup * sprites_layers = self._spritelayers # <<<<<<<<<<<<<< @@ -11186,7 +11446,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py __pyx_v_sprites_layers = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":717 + /* "pygame/_sprite.pyx":719 * sprites = self._spritelist # speedup * sprites_layers = self._spritelayers * sprites_layers[sprite] = layer # <<<<<<<<<<<<<< @@ -11195,11 +11455,11 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py */ if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 717, __pyx_L1_error) + __PYX_ERR(0, 719, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_sprites_layers, __pyx_v_sprite, __pyx_v_layer) < 0)) __PYX_ERR(0, 717, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_sprites_layers, __pyx_v_sprite, __pyx_v_layer) < 0)) __PYX_ERR(0, 719, __pyx_L1_error) - /* "pygame/_sprite.pyx":721 + /* "pygame/_sprite.pyx":723 * # add the sprite at the right position * # bisect algorithmus * leng = len(sprites) # <<<<<<<<<<<<<< @@ -11208,15 +11468,15 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 721, __pyx_L1_error) + __PYX_ERR(0, 723, __pyx_L1_error) } - __pyx_t_12 = PyList_GET_SIZE(__pyx_v_sprites); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 721, __pyx_L1_error) - __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_12 = PyList_GET_SIZE(__pyx_v_sprites); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 723, __pyx_L1_error) + __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_leng = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":722 + /* "pygame/_sprite.pyx":724 * # bisect algorithmus * leng = len(sprites) * low = mid = 0 # <<<<<<<<<<<<<< @@ -11228,19 +11488,19 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py __Pyx_INCREF(__pyx_int_0); __pyx_v_mid = __pyx_int_0; - /* "pygame/_sprite.pyx":723 + /* "pygame/_sprite.pyx":725 * leng = len(sprites) * low = mid = 0 * high = leng - 1 # <<<<<<<<<<<<<< * while low <= high: * mid = low + (high - low) // 2 */ - __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_leng, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_leng, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_high = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":724 + /* "pygame/_sprite.pyx":726 * low = mid = 0 * high = leng - 1 * while low <= high: # <<<<<<<<<<<<<< @@ -11248,30 +11508,30 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py * if sprites_layers[sprites[mid]] <= layer: */ while (1) { - __pyx_t_3 = PyObject_RichCompare(__pyx_v_low, __pyx_v_high, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_low, __pyx_v_high, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_7) break; - /* "pygame/_sprite.pyx":725 + /* "pygame/_sprite.pyx":727 * high = leng - 1 * while low <= high: * mid = low + (high - low) // 2 # <<<<<<<<<<<<<< * if sprites_layers[sprites[mid]] <= layer: * low = mid + 1 */ - __pyx_t_3 = PyNumber_Subtract(__pyx_v_high, __pyx_v_low); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error) + __pyx_t_3 = PyNumber_Subtract(__pyx_v_high, __pyx_v_low); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_3, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_3, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_v_low, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_low, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_mid, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":726 + /* "pygame/_sprite.pyx":728 * while low <= high: * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= layer: # <<<<<<<<<<<<<< @@ -11280,36 +11540,36 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py */ if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 726, __pyx_L1_error) + __PYX_ERR(0, 728, __pyx_L1_error) } if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 726, __pyx_L1_error) + __PYX_ERR(0, 728, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { - /* "pygame/_sprite.pyx":727 + /* "pygame/_sprite.pyx":729 * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= layer: * low = mid + 1 # <<<<<<<<<<<<<< * else: * high = mid - 1 */ - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_low, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":726 + /* "pygame/_sprite.pyx":728 * while low <= high: * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= layer: # <<<<<<<<<<<<<< @@ -11319,7 +11579,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py goto __pyx_L14; } - /* "pygame/_sprite.pyx":729 + /* "pygame/_sprite.pyx":731 * low = mid + 1 * else: * high = mid - 1 # <<<<<<<<<<<<<< @@ -11327,7 +11587,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py * while mid < leng and sprites_layers[sprites[mid]] <= layer: */ /*else*/ { - __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 729, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_high, __pyx_t_3); __pyx_t_3 = 0; @@ -11335,7 +11595,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py __pyx_L14:; } - /* "pygame/_sprite.pyx":731 + /* "pygame/_sprite.pyx":733 * high = mid - 1 * # linear search to find final position * while mid < leng and sprites_layers[sprites[mid]] <= layer: # <<<<<<<<<<<<<< @@ -11343,8 +11603,8 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py * sprites.insert(mid, sprite) */ while (1) { - __pyx_t_3 = PyObject_RichCompare(__pyx_v_mid, __pyx_v_leng, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_mid, __pyx_v_leng, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { } else { @@ -11353,39 +11613,39 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py } if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 731, __pyx_L1_error) + __PYX_ERR(0, 733, __pyx_L1_error) } if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 731, __pyx_L1_error) + __PYX_ERR(0, 733, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __pyx_t_8; __pyx_L17_bool_binop_done:; if (!__pyx_t_7) break; - /* "pygame/_sprite.pyx":732 + /* "pygame/_sprite.pyx":734 * # linear search to find final position * while mid < leng and sprites_layers[sprites[mid]] <= layer: * mid += 1 # <<<<<<<<<<<<<< * sprites.insert(mid, sprite) * */ - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 732, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_mid, __pyx_t_3); __pyx_t_3 = 0; } - /* "pygame/_sprite.pyx":733 + /* "pygame/_sprite.pyx":735 * while mid < leng and sprites_layers[sprites[mid]] <= layer: * mid += 1 * sprites.insert(mid, sprite) # <<<<<<<<<<<<<< @@ -11394,12 +11654,12 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(struct __pyx_obj_6py */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "insert"); - __PYX_ERR(0, 733, __pyx_L1_error) + __PYX_ERR(0, 735, __pyx_L1_error) } - __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_mid); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L1_error) - __pyx_t_13 = PyList_Insert(__pyx_v_sprites, __pyx_t_12, __pyx_v_sprite); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 733, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_mid); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_13 = PyList_Insert(__pyx_v_sprites, __pyx_t_12, __pyx_v_sprite); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 735, __pyx_L1_error) - /* "pygame/_sprite.pyx":699 + /* "pygame/_sprite.pyx":701 * self.add(*sprites, **kwargs) * * cpdef void add_internal(self, sprite, layer=None): # <<<<<<<<<<<<<< @@ -11433,6 +11693,9 @@ static char __pyx_doc_6pygame_7_sprite_14LayeredUpdates_4add_internal[] = "Do no static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_5add_internal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_layer = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_internal (wrapper)", 0); @@ -11464,7 +11727,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_5add_internal(PyObje } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_internal") < 0)) __PYX_ERR(0, 699, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_internal") < 0)) __PYX_ERR(0, 701, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -11480,7 +11743,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_5add_internal(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_internal", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 699, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_internal", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 701, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -11498,12 +11761,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_4add_internal(struct __Pyx_RefNannyDeclarations struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1.__pyx_n = 1; __pyx_t_1.layer = __pyx_v_layer; __pyx_vtabptr_6pygame_7_sprite_LayeredUpdates->add_internal(__pyx_v_self, __pyx_v_sprite, 1, &__pyx_t_1); - __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -11524,7 +11790,7 @@ void __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal__pyx_wrap_1(struct _ __pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal(__pyx_v_self, __pyx_v_sprite, __pyx_skip_dispatch, NULL); } -/* "pygame/_sprite.pyx":735 +/* "pygame/_sprite.pyx":737 * sprites.insert(mid, sprite) * * def add(self, *sprites, **kwargs): # <<<<<<<<<<<<<< @@ -11572,16 +11838,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; - PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; Py_ssize_t __pyx_t_16; PyObject *(*__pyx_t_17)(PyObject *); PyObject *__pyx_t_18 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add", 0); - /* "pygame/_sprite.pyx":748 + /* "pygame/_sprite.pyx":750 * """ * * if not sprites: # <<<<<<<<<<<<<< @@ -11592,7 +11861,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "pygame/_sprite.pyx":749 + /* "pygame/_sprite.pyx":751 * * if not sprites: * return # <<<<<<<<<<<<<< @@ -11603,7 +11872,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pygame/_sprite.pyx":748 + /* "pygame/_sprite.pyx":750 * """ * * if not sprites: # <<<<<<<<<<<<<< @@ -11612,30 +11881,30 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob */ } - /* "pygame/_sprite.pyx":750 + /* "pygame/_sprite.pyx":752 * if not sprites: * return * if 'layer' in kwargs: # <<<<<<<<<<<<<< * layer = kwargs['layer'] * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_layer_2, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 750, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_layer_2, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 752, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "pygame/_sprite.pyx":751 + /* "pygame/_sprite.pyx":753 * return * if 'layer' in kwargs: * layer = kwargs['layer'] # <<<<<<<<<<<<<< * else: * layer = None */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_layer_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_kwargs, __pyx_n_s_layer_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_layer = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":750 + /* "pygame/_sprite.pyx":752 * if not sprites: * return * if 'layer' in kwargs: # <<<<<<<<<<<<<< @@ -11645,7 +11914,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob goto __pyx_L4; } - /* "pygame/_sprite.pyx":753 + /* "pygame/_sprite.pyx":755 * layer = kwargs['layer'] * else: * layer = None # <<<<<<<<<<<<<< @@ -11658,7 +11927,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob } __pyx_L4:; - /* "pygame/_sprite.pyx":754 + /* "pygame/_sprite.pyx":756 * else: * layer = None * for sprite in sprites: # <<<<<<<<<<<<<< @@ -11669,15 +11938,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob for (;;) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 754, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 756, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 754, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_v_sprite, __pyx_t_5); __pyx_t_5 = 0; - /* "pygame/_sprite.pyx":758 + /* "pygame/_sprite.pyx":760 * # If this is the case, we should add the sprite itself, * # and not the iterator object. * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< @@ -11688,7 +11957,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pygame/_sprite.pyx":759 + /* "pygame/_sprite.pyx":761 * # and not the iterator object. * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -11698,7 +11967,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.has_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 0) != 0)) != 0); if (__pyx_t_2) { - /* "pygame/_sprite.pyx":760 + /* "pygame/_sprite.pyx":762 * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): * self.add_internal(sprite, layer) # <<<<<<<<<<<<<< @@ -11709,7 +11978,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __pyx_t_6.layer = __pyx_v_layer; ((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_sprite, 0, &__pyx_t_6); - /* "pygame/_sprite.pyx":761 + /* "pygame/_sprite.pyx":763 * if not self.has_internal(sprite): * self.add_internal(sprite, layer) * (sprite).add_internal(self) # <<<<<<<<<<<<<< @@ -11718,7 +11987,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob */ ((struct __pyx_vtabstruct_6pygame_7_sprite_Sprite *)((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_sprite)->__pyx_vtab)->add_internal(((struct __pyx_obj_6pygame_7_sprite_Sprite *)__pyx_v_sprite), ((PyObject *)__pyx_v_self), 0); - /* "pygame/_sprite.pyx":759 + /* "pygame/_sprite.pyx":761 * # and not the iterator object. * if isinstance(sprite, Sprite): * if not self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -11727,7 +11996,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob */ } - /* "pygame/_sprite.pyx":758 + /* "pygame/_sprite.pyx":760 * # If this is the case, we should add the sprite itself, * # and not the iterator object. * if isinstance(sprite, Sprite): # <<<<<<<<<<<<<< @@ -11737,7 +12006,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob goto __pyx_L7; } - /* "pygame/_sprite.pyx":763 + /* "pygame/_sprite.pyx":765 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< @@ -11754,24 +12023,27 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { - /* "pygame/_sprite.pyx":766 + /* "pygame/_sprite.pyx":768 * # See if sprite is an iterator, like a list or sprite * # group. * self.add(*sprite, **kwargs) # <<<<<<<<<<<<<< * except (TypeError, AttributeError): * # Not iterable. This is probably a sprite that is not an */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 766, __pyx_L9_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 766, __pyx_L9_error) + __pyx_t_10 = __Pyx_PySequence_Tuple(__pyx_v_sprite); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 768, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, __pyx_v_kwargs); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 766, __pyx_L9_error) + __pyx_t_11 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 768, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 768, __pyx_L9_error) + __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "pygame/_sprite.pyx":763 + /* "pygame/_sprite.pyx":765 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< @@ -11786,42 +12058,43 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __pyx_L9_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pygame/_sprite.pyx":767 + /* "pygame/_sprite.pyx":769 * # group. * self.add(*sprite, **kwargs) * except (TypeError, AttributeError): # <<<<<<<<<<<<<< * # Not iterable. This is probably a sprite that is not an * # instance of the Sprite class or is not an instance of a */ - __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); - if (__pyx_t_12) { + __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); + if (__pyx_t_13) { __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.add", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_5) < 0) __PYX_ERR(0, 767, __pyx_L11_except_error) + if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10) < 0) __PYX_ERR(0, 769, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_10); - __Pyx_GOTREF(__pyx_t_5); - /* "pygame/_sprite.pyx":772 + /* "pygame/_sprite.pyx":774 * # subclass of the Sprite class. Alternately, it could be an * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< * for spr in sprite.sprites(): * if not self.has_internal(spr): */ - __pyx_t_2 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 772, __pyx_L11_except_error) + __pyx_t_2 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_spritegroup); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 774, __pyx_L11_except_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "pygame/_sprite.pyx":773 + /* "pygame/_sprite.pyx":775 * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< * if not self.has_internal(spr): * self.add_internal(spr, layer) */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 773, __pyx_L11_except_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_sprites); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 775, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { @@ -11833,55 +12106,55 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __Pyx_DECREF_SET(__pyx_t_14, function); } } - __pyx_t_13 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_14); + __pyx_t_5 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 773, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_13); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 775, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (likely(PyList_CheckExact(__pyx_t_13)) || PyTuple_CheckExact(__pyx_t_13)) { - __pyx_t_14 = __pyx_t_13; __Pyx_INCREF(__pyx_t_14); __pyx_t_16 = 0; + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_14 = __pyx_t_5; __Pyx_INCREF(__pyx_t_14); __pyx_t_16 = 0; __pyx_t_17 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 773, __pyx_L11_except_error) + __pyx_t_16 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 775, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_17 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 773, __pyx_L11_except_error) + __pyx_t_17 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 775, __pyx_L11_except_error) } - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_17)) { if (likely(PyList_CheckExact(__pyx_t_14))) { if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_13 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_16); __Pyx_INCREF(__pyx_t_13); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 773, __pyx_L11_except_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_16); __Pyx_INCREF(__pyx_t_5); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 775, __pyx_L11_except_error) #else - __pyx_t_13 = PySequence_ITEM(__pyx_t_14, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 773, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = PySequence_ITEM(__pyx_t_14, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 775, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_16); __Pyx_INCREF(__pyx_t_13); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 773, __pyx_L11_except_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_16); __Pyx_INCREF(__pyx_t_5); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 775, __pyx_L11_except_error) #else - __pyx_t_13 = PySequence_ITEM(__pyx_t_14, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 773, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = PySequence_ITEM(__pyx_t_14, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 775, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_5); #endif } } else { - __pyx_t_13 = __pyx_t_17(__pyx_t_14); - if (unlikely(!__pyx_t_13)) { + __pyx_t_5 = __pyx_t_17(__pyx_t_14); + if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 773, __pyx_L11_except_error) + else __PYX_ERR(0, 775, __pyx_L11_except_error) } break; } - __Pyx_GOTREF(__pyx_t_13); + __Pyx_GOTREF(__pyx_t_5); } - __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_13); - __pyx_t_13 = 0; + __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_5); + __pyx_t_5 = 0; - /* "pygame/_sprite.pyx":774 + /* "pygame/_sprite.pyx":776 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if not self.has_internal(spr): # <<<<<<<<<<<<<< @@ -11891,7 +12164,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.has_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_spr, 0) != 0)) != 0); if (__pyx_t_1) { - /* "pygame/_sprite.pyx":775 + /* "pygame/_sprite.pyx":777 * for spr in sprite.sprites(): * if not self.has_internal(spr): * self.add_internal(spr, layer) # <<<<<<<<<<<<<< @@ -11902,14 +12175,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __pyx_t_6.layer = __pyx_v_layer; ((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_spr, 0, &__pyx_t_6); - /* "pygame/_sprite.pyx":776 + /* "pygame/_sprite.pyx":778 * if not self.has_internal(spr): * self.add_internal(spr, layer) * spr.add_internal(self) # <<<<<<<<<<<<<< * elif not self.has_internal(sprite): * self.add_internal(sprite, layer) */ - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 776, __pyx_L11_except_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 778, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_18 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) { @@ -11921,14 +12194,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __Pyx_DECREF_SET(__pyx_t_15, function); } } - __pyx_t_13 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_18, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_15, ((PyObject *)__pyx_v_self)); + __pyx_t_5 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_18, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_15, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 776, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_13); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 778, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "pygame/_sprite.pyx":774 + /* "pygame/_sprite.pyx":776 * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): * if not self.has_internal(spr): # <<<<<<<<<<<<<< @@ -11937,7 +12210,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob */ } - /* "pygame/_sprite.pyx":773 + /* "pygame/_sprite.pyx":775 * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): * for spr in sprite.sprites(): # <<<<<<<<<<<<<< @@ -11947,7 +12220,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "pygame/_sprite.pyx":772 + /* "pygame/_sprite.pyx":774 * # subclass of the Sprite class. Alternately, it could be an * # old-style sprite group. * if hasattr(sprite, '_spritegroup'): # <<<<<<<<<<<<<< @@ -11957,7 +12230,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob goto __pyx_L19; } - /* "pygame/_sprite.pyx":777 + /* "pygame/_sprite.pyx":779 * self.add_internal(spr, layer) * spr.add_internal(self) * elif not self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -11967,7 +12240,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __pyx_t_1 = ((!(((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.has_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 0) != 0)) != 0); if (__pyx_t_1) { - /* "pygame/_sprite.pyx":778 + /* "pygame/_sprite.pyx":780 * spr.add_internal(self) * elif not self.has_internal(sprite): * self.add_internal(sprite, layer) # <<<<<<<<<<<<<< @@ -11978,33 +12251,33 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __pyx_t_6.layer = __pyx_v_layer; ((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->add_internal(__pyx_v_self, __pyx_v_sprite, 0, &__pyx_t_6); - /* "pygame/_sprite.pyx":779 + /* "pygame/_sprite.pyx":781 * elif not self.has_internal(sprite): * self.add_internal(sprite, layer) * sprite.add_internal(self) # <<<<<<<<<<<<<< * * cpdef void remove_internal(self, sprite): */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 779, __pyx_L11_except_error) - __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 781, __pyx_L11_except_error) + __Pyx_GOTREF(__pyx_t_5); __pyx_t_15 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { - __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_13); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_15)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_13, function); + __Pyx_DECREF_SET(__pyx_t_5, function); } } - __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_15, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_13, ((PyObject *)__pyx_v_self)); + __pyx_t_14 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_15, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 779, __pyx_L11_except_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 781, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "pygame/_sprite.pyx":777 + /* "pygame/_sprite.pyx":779 * self.add_internal(spr, layer) * spr.add_internal(self) * elif not self.has_internal(sprite): # <<<<<<<<<<<<<< @@ -12013,15 +12286,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob */ } __pyx_L19:; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_exception_handled; } goto __pyx_L11_except_error; __pyx_L11_except_error:; - /* "pygame/_sprite.pyx":763 + /* "pygame/_sprite.pyx":765 * (sprite).add_internal(self) * else: * try: # <<<<<<<<<<<<<< @@ -12043,7 +12316,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob } __pyx_L7:; - /* "pygame/_sprite.pyx":754 + /* "pygame/_sprite.pyx":756 * else: * layer = None * for sprite in sprites: # <<<<<<<<<<<<<< @@ -12053,7 +12326,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":735 + /* "pygame/_sprite.pyx":737 * sprites.insert(mid, sprite) * * def add(self, *sprites, **kwargs): # <<<<<<<<<<<<<< @@ -12069,7 +12342,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); - __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_18); @@ -12084,7 +12357,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_6add(struct __pyx_ob return __pyx_r; } -/* "pygame/_sprite.pyx":781 +/* "pygame/_sprite.pyx":783 * sprite.add_internal(self) * * cpdef void remove_internal(self, sprite): # <<<<<<<<<<<<<< @@ -12103,6 +12376,9 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -12113,7 +12389,7 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_9remove_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -12129,7 +12405,7 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -12149,14 +12425,14 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p #endif } - /* "pygame/_sprite.pyx":787 + /* "pygame/_sprite.pyx":789 * * """ * self._spritelist.remove(sprite) # <<<<<<<<<<<<<< * # these dirty rects are suboptimal for one frame * r = self.spritedict[sprite] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_spritelist, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_spritelist, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -12170,12 +12446,12 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":789 + /* "pygame/_sprite.pyx":791 * self._spritelist.remove(sprite) * # these dirty rects are suboptimal for one frame * r = self.spritedict[sprite] # <<<<<<<<<<<<<< @@ -12184,28 +12460,28 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p */ if (unlikely(__pyx_v_self->__pyx_base.spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 789, __pyx_L1_error) + __PYX_ERR(0, 791, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx_base.spritedict, __pyx_v_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx_base.spritedict, __pyx_v_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_r = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":790 + /* "pygame/_sprite.pyx":792 * # these dirty rects are suboptimal for one frame * r = self.spritedict[sprite] * if r is not self._init_rect: # <<<<<<<<<<<<<< * self.lostsprites.append(r) # dirty rect * if hasattr(sprite, 'rect'): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = (__pyx_v_r != __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "pygame/_sprite.pyx":791 + /* "pygame/_sprite.pyx":793 * r = self.spritedict[sprite] * if r is not self._init_rect: * self.lostsprites.append(r) # dirty rect # <<<<<<<<<<<<<< @@ -12214,11 +12490,11 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p */ if (unlikely(__pyx_v_self->__pyx_base.lostsprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 791, __pyx_L1_error) + __PYX_ERR(0, 793, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.lostsprites, __pyx_v_r); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 791, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.lostsprites, __pyx_v_r); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 793, __pyx_L1_error) - /* "pygame/_sprite.pyx":790 + /* "pygame/_sprite.pyx":792 * # these dirty rects are suboptimal for one frame * r = self.spritedict[sprite] * if r is not self._init_rect: # <<<<<<<<<<<<<< @@ -12227,18 +12503,18 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p */ } - /* "pygame/_sprite.pyx":792 + /* "pygame/_sprite.pyx":794 * if r is not self._init_rect: * self.lostsprites.append(r) # dirty rect * if hasattr(sprite, 'rect'): # <<<<<<<<<<<<<< * self.lostsprites.append(sprite.rect) # dirty rect * */ - __pyx_t_6 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 792, __pyx_L1_error) + __pyx_t_6 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 794, __pyx_L1_error) __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":793 + /* "pygame/_sprite.pyx":795 * self.lostsprites.append(r) # dirty rect * if hasattr(sprite, 'rect'): * self.lostsprites.append(sprite.rect) # dirty rect # <<<<<<<<<<<<<< @@ -12247,14 +12523,14 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p */ if (unlikely(__pyx_v_self->__pyx_base.lostsprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 793, __pyx_L1_error) + __PYX_ERR(0, 795, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.lostsprites, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.lostsprites, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":792 + /* "pygame/_sprite.pyx":794 * if r is not self._init_rect: * self.lostsprites.append(r) # dirty rect * if hasattr(sprite, 'rect'): # <<<<<<<<<<<<<< @@ -12263,7 +12539,7 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p */ } - /* "pygame/_sprite.pyx":795 + /* "pygame/_sprite.pyx":797 * self.lostsprites.append(sprite.rect) # dirty rect * * del self.spritedict[sprite] # <<<<<<<<<<<<<< @@ -12272,11 +12548,11 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p */ if (unlikely(__pyx_v_self->__pyx_base.spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 795, __pyx_L1_error) + __PYX_ERR(0, 797, __pyx_L1_error) } - if (unlikely(PyDict_DelItem(__pyx_v_self->__pyx_base.spritedict, __pyx_v_sprite) < 0)) __PYX_ERR(0, 795, __pyx_L1_error) + if (unlikely(PyDict_DelItem(__pyx_v_self->__pyx_base.spritedict, __pyx_v_sprite) < 0)) __PYX_ERR(0, 797, __pyx_L1_error) - /* "pygame/_sprite.pyx":796 + /* "pygame/_sprite.pyx":798 * * del self.spritedict[sprite] * del self._spritelayers[sprite] # <<<<<<<<<<<<<< @@ -12285,11 +12561,11 @@ static void __pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(struct __p */ if (unlikely(__pyx_v_self->_spritelayers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 796, __pyx_L1_error) + __PYX_ERR(0, 798, __pyx_L1_error) } - if (unlikely(PyDict_DelItem(__pyx_v_self->_spritelayers, __pyx_v_sprite) < 0)) __PYX_ERR(0, 796, __pyx_L1_error) + if (unlikely(PyDict_DelItem(__pyx_v_self->_spritelayers, __pyx_v_sprite) < 0)) __PYX_ERR(0, 798, __pyx_L1_error) - /* "pygame/_sprite.pyx":781 + /* "pygame/_sprite.pyx":783 * sprite.add_internal(self) * * cpdef void remove_internal(self, sprite): # <<<<<<<<<<<<<< @@ -12328,9 +12604,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_8remove_internal(str PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -12347,7 +12626,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_8remove_internal(str return __pyx_r; } -/* "pygame/_sprite.pyx":798 +/* "pygame/_sprite.pyx":800 * del self._spritelayers[sprite] * * cpdef list sprites(self): # <<<<<<<<<<<<<< @@ -12363,6 +12642,9 @@ static PyObject *__pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites(struct __pyx_ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -12373,7 +12655,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites(struct __pyx_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_14LayeredUpdates_11sprites)) { __Pyx_XDECREF(__pyx_r); @@ -12390,10 +12672,10 @@ static PyObject *__pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites(struct __pyx_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 798, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 800, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -12412,7 +12694,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites(struct __pyx_ #endif } - /* "pygame/_sprite.pyx":804 + /* "pygame/_sprite.pyx":806 * * """ * return list(self._spritelist) # <<<<<<<<<<<<<< @@ -12420,13 +12702,13 @@ static PyObject *__pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites(struct __pyx_ * def draw(self, surface): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PySequence_List(__pyx_v_self->_spritelist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_v_self->_spritelist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":798 + /* "pygame/_sprite.pyx":800 * del self._spritelayers[sprite] * * cpdef list sprites(self): # <<<<<<<<<<<<<< @@ -12466,9 +12748,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_10sprites(struct __p PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6pygame_7_sprite_14LayeredUpdates_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -12485,7 +12770,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_10sprites(struct __p return __pyx_r; } -/* "pygame/_sprite.pyx":806 +/* "pygame/_sprite.pyx":808 * return list(self._spritelist) * * def draw(self, surface): # <<<<<<<<<<<<<< @@ -12530,9 +12815,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 0); - /* "pygame/_sprite.pyx":812 + /* "pygame/_sprite.pyx":814 * * """ * spritedict = self.spritedict # <<<<<<<<<<<<<< @@ -12544,19 +12832,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ __pyx_v_spritedict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":813 + /* "pygame/_sprite.pyx":815 * """ * spritedict = self.spritedict * surface_blit = surface.blit # <<<<<<<<<<<<<< * dirty = self.lostsprites * self.lostsprites.clear() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_surface_blit = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":814 + /* "pygame/_sprite.pyx":816 * spritedict = self.spritedict * surface_blit = surface.blit * dirty = self.lostsprites # <<<<<<<<<<<<<< @@ -12568,14 +12856,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ __pyx_v_dirty = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":815 + /* "pygame/_sprite.pyx":817 * surface_blit = surface.blit * dirty = self.lostsprites * self.lostsprites.clear() # <<<<<<<<<<<<<< * dirty_append = dirty.append * init_rect = self._init_rect */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.lostsprites, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base.lostsprites, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -12589,62 +12877,62 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":816 + /* "pygame/_sprite.pyx":818 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< * init_rect = self._init_rect * for spr in self.sprites(): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirty, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dirty, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_dirty_append = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":817 + /* "pygame/_sprite.pyx":819 * self.lostsprites.clear() * dirty_append = dirty.append * init_rect = self._init_rect # <<<<<<<<<<<<<< * for spr in self.sprites(): * rec = spritedict[spr] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_init_rect = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":818 + /* "pygame/_sprite.pyx":820 * dirty_append = dirty.append * init_rect = self._init_rect * for spr in self.sprites(): # <<<<<<<<<<<<<< * rec = spritedict[spr] * newrect = surface_blit(spr.image, spr.rect) */ - __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.sprites(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.sprites(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 818, __pyx_L1_error) + __PYX_ERR(0, 820, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 820, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":819 + /* "pygame/_sprite.pyx":821 * init_rect = self._init_rect * for spr in self.sprites(): * rec = spritedict[spr] # <<<<<<<<<<<<<< @@ -12653,23 +12941,23 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ */ if (unlikely(__pyx_v_spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 819, __pyx_L1_error) + __PYX_ERR(0, 821, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_spritedict, __pyx_v_spr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_spritedict, __pyx_v_spr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_rec, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":820 + /* "pygame/_sprite.pyx":822 * for spr in self.sprites(): * rec = spritedict[spr] * newrect = surface_blit(spr.image, spr.rect) # <<<<<<<<<<<<<< * if rec is init_rect: * dirty_append(newrect) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_surface_blit); __pyx_t_6 = __pyx_v_surface_blit; __pyx_t_7 = NULL; @@ -12687,7 +12975,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -12697,7 +12985,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -12705,7 +12993,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -12716,7 +13004,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -12724,7 +13012,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ __Pyx_XDECREF_SET(__pyx_v_newrect, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":821 + /* "pygame/_sprite.pyx":823 * rec = spritedict[spr] * newrect = surface_blit(spr.image, spr.rect) * if rec is init_rect: # <<<<<<<<<<<<<< @@ -12735,7 +13023,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { - /* "pygame/_sprite.pyx":816 + /* "pygame/_sprite.pyx":818 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< @@ -12744,19 +13032,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 816, __pyx_L1_error) + __PYX_ERR(0, 818, __pyx_L1_error) } - /* "pygame/_sprite.pyx":822 + /* "pygame/_sprite.pyx":824 * newrect = surface_blit(spr.image, spr.rect) * if rec is init_rect: * dirty_append(newrect) # <<<<<<<<<<<<<< * else: * if newrect.colliderect(rec): */ - __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 824, __pyx_L1_error) - /* "pygame/_sprite.pyx":821 + /* "pygame/_sprite.pyx":823 * rec = spritedict[spr] * newrect = surface_blit(spr.image, spr.rect) * if rec is init_rect: # <<<<<<<<<<<<<< @@ -12766,7 +13054,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ goto __pyx_L5; } - /* "pygame/_sprite.pyx":824 + /* "pygame/_sprite.pyx":826 * dirty_append(newrect) * else: * if newrect.colliderect(rec): # <<<<<<<<<<<<<< @@ -12774,7 +13062,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ * else: */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -12788,14 +13076,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_v_rec) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_rec); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { - /* "pygame/_sprite.pyx":816 + /* "pygame/_sprite.pyx":818 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< @@ -12804,17 +13092,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 816, __pyx_L1_error) + __PYX_ERR(0, 818, __pyx_L1_error) } - /* "pygame/_sprite.pyx":825 + /* "pygame/_sprite.pyx":827 * else: * if newrect.colliderect(rec): * dirty_append(newrect.union(rec)) # <<<<<<<<<<<<<< * else: * dirty_append(newrect) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_union); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_newrect, __pyx_n_s_union); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -12828,13 +13116,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_9, __pyx_v_rec) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_rec); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":824 + /* "pygame/_sprite.pyx":826 * dirty_append(newrect) * else: * if newrect.colliderect(rec): # <<<<<<<<<<<<<< @@ -12844,7 +13132,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ goto __pyx_L6; } - /* "pygame/_sprite.pyx":827 + /* "pygame/_sprite.pyx":829 * dirty_append(newrect.union(rec)) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< @@ -12853,7 +13141,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ */ /*else*/ { - /* "pygame/_sprite.pyx":816 + /* "pygame/_sprite.pyx":818 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< @@ -12862,19 +13150,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 816, __pyx_L1_error) + __PYX_ERR(0, 818, __pyx_L1_error) } - /* "pygame/_sprite.pyx":827 + /* "pygame/_sprite.pyx":829 * dirty_append(newrect.union(rec)) * else: * dirty_append(newrect) # <<<<<<<<<<<<<< * dirty_append(rec) * spritedict[spr] = newrect */ - __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_newrect); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 829, __pyx_L1_error) - /* "pygame/_sprite.pyx":816 + /* "pygame/_sprite.pyx":818 * dirty = self.lostsprites * self.lostsprites.clear() * dirty_append = dirty.append # <<<<<<<<<<<<<< @@ -12883,23 +13171,23 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ */ if (unlikely(__pyx_v_dirty == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 816, __pyx_L1_error) + __PYX_ERR(0, 818, __pyx_L1_error) } - /* "pygame/_sprite.pyx":828 + /* "pygame/_sprite.pyx":830 * else: * dirty_append(newrect) * dirty_append(rec) # <<<<<<<<<<<<<< * spritedict[spr] = newrect * return dirty */ - __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_rec); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_dirty, __pyx_v_rec); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 830, __pyx_L1_error) } __pyx_L6:; } __pyx_L5:; - /* "pygame/_sprite.pyx":829 + /* "pygame/_sprite.pyx":831 * dirty_append(newrect) * dirty_append(rec) * spritedict[spr] = newrect # <<<<<<<<<<<<<< @@ -12908,11 +13196,11 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ */ if (unlikely(__pyx_v_spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 829, __pyx_L1_error) + __PYX_ERR(0, 831, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_spritedict, __pyx_v_spr, __pyx_v_newrect) < 0)) __PYX_ERR(0, 829, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_spritedict, __pyx_v_spr, __pyx_v_newrect) < 0)) __PYX_ERR(0, 831, __pyx_L1_error) - /* "pygame/_sprite.pyx":818 + /* "pygame/_sprite.pyx":820 * dirty_append = dirty.append * init_rect = self._init_rect * for spr in self.sprites(): # <<<<<<<<<<<<<< @@ -12922,7 +13210,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":830 + /* "pygame/_sprite.pyx":832 * dirty_append(rec) * spritedict[spr] = newrect * return dirty # <<<<<<<<<<<<<< @@ -12934,7 +13222,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ __pyx_r = __pyx_v_dirty; goto __pyx_L0; - /* "pygame/_sprite.pyx":806 + /* "pygame/_sprite.pyx":808 * return list(self._spritelist) * * def draw(self, surface): # <<<<<<<<<<<<<< @@ -12967,7 +13255,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_12draw(struct __pyx_ return __pyx_r; } -/* "pygame/_sprite.pyx":832 +/* "pygame/_sprite.pyx":834 * return dirty * * def get_sprites_at(self, pos): # <<<<<<<<<<<<<< @@ -13002,9 +13290,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(str PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sprites_at", 0); - /* "pygame/_sprite.pyx":840 + /* "pygame/_sprite.pyx":842 * * """ * _sprites = self._spritelist # <<<<<<<<<<<<<< @@ -13016,14 +13307,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(str __pyx_v__sprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":841 + /* "pygame/_sprite.pyx":843 * """ * _sprites = self._spritelist * rect = Rect(pos, (0, 0)) # <<<<<<<<<<<<<< * colliding_idx = rect.collidelistall(_sprites) * colliding = [_sprites[i] for i in colliding_idx] */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_pos); __Pyx_GIVEREF(__pyx_v_pos); @@ -13031,20 +13322,20 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(str __Pyx_INCREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_tuple__11); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rect = ((pgRectObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":842 + /* "pygame/_sprite.pyx":844 * _sprites = self._spritelist * rect = Rect(pos, (0, 0)) * colliding_idx = rect.collidelistall(_sprites) # <<<<<<<<<<<<<< * colliding = [_sprites[i] for i in colliding_idx] * return colliding */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rect), __pyx_n_s_collidelistall); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rect), __pyx_n_s_collidelistall); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -13058,45 +13349,45 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(str } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v__sprites) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__sprites); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_colliding_idx = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":843 + /* "pygame/_sprite.pyx":845 * rect = Rect(pos, (0, 0)) * colliding_idx = rect.collidelistall(_sprites) * colliding = [_sprites[i] for i in colliding_idx] # <<<<<<<<<<<<<< * return colliding * */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_colliding_idx)) || PyTuple_CheckExact(__pyx_v_colliding_idx)) { __pyx_t_1 = __pyx_v_colliding_idx; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_colliding_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_colliding_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 845, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 845, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 845, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -13106,7 +13397,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(str PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 843, __pyx_L1_error) + else __PYX_ERR(0, 845, __pyx_L1_error) } break; } @@ -13116,18 +13407,18 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(str __pyx_t_3 = 0; if (unlikely(__pyx_v__sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 843, __pyx_L1_error) + __PYX_ERR(0, 845, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v__sprites, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v__sprites, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 843, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_colliding = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":844 + /* "pygame/_sprite.pyx":846 * colliding_idx = rect.collidelistall(_sprites) * colliding = [_sprites[i] for i in colliding_idx] * return colliding # <<<<<<<<<<<<<< @@ -13139,7 +13430,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(str __pyx_r = __pyx_v_colliding; goto __pyx_L0; - /* "pygame/_sprite.pyx":832 + /* "pygame/_sprite.pyx":834 * return dirty * * def get_sprites_at(self, pos): # <<<<<<<<<<<<<< @@ -13165,7 +13456,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14get_sprites_at(str return __pyx_r; } -/* "pygame/_sprite.pyx":846 +/* "pygame/_sprite.pyx":848 * return colliding * * def get_sprite(self, idx): # <<<<<<<<<<<<<< @@ -13191,9 +13482,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_16get_sprite(struct PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sprite", 0); - /* "pygame/_sprite.pyx":854 + /* "pygame/_sprite.pyx":856 * * """ * return self._spritelist[idx] # <<<<<<<<<<<<<< @@ -13203,15 +13497,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_16get_sprite(struct __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 854, __pyx_L1_error) + __PYX_ERR(0, 856, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_spritelist, __pyx_v_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_spritelist, __pyx_v_idx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":846 + /* "pygame/_sprite.pyx":848 * return colliding * * def get_sprite(self, idx): # <<<<<<<<<<<<<< @@ -13230,7 +13524,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_16get_sprite(struct return __pyx_r; } -/* "pygame/_sprite.pyx":856 +/* "pygame/_sprite.pyx":858 * return self._spritelist[idx] * * def remove_sprites_of_layer(self, layer_nr): # <<<<<<<<<<<<<< @@ -13259,16 +13553,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_18remove_sprites_of_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_sprites_of_layer", 0); - /* "pygame/_sprite.pyx":862 + /* "pygame/_sprite.pyx":864 * * """ * sprites = self.get_sprites_from_layer(layer_nr) # <<<<<<<<<<<<<< * self.remove(*sprites) * return sprites */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_sprites_from_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_sprites_from_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -13282,30 +13579,30 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_18remove_sprites_of_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_layer_nr) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_layer_nr); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 862, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sprites = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":863 + /* "pygame/_sprite.pyx":865 * """ * sprites = self.get_sprites_from_layer(layer_nr) * self.remove(*sprites) # <<<<<<<<<<<<<< * return sprites * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_sprites); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_sprites); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":864 + /* "pygame/_sprite.pyx":866 * sprites = self.get_sprites_from_layer(layer_nr) * self.remove(*sprites) * return sprites # <<<<<<<<<<<<<< @@ -13317,7 +13614,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_18remove_sprites_of_ __pyx_r = __pyx_v_sprites; goto __pyx_L0; - /* "pygame/_sprite.pyx":856 + /* "pygame/_sprite.pyx":858 * return self._spritelist[idx] * * def remove_sprites_of_layer(self, layer_nr): # <<<<<<<<<<<<<< @@ -13339,7 +13636,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_18remove_sprites_of_ return __pyx_r; } -/* "pygame/_sprite.pyx":867 +/* "pygame/_sprite.pyx":869 * * #---# layer methods * def layers(self): # <<<<<<<<<<<<<< @@ -13368,9 +13665,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_20layers(struct __py PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("layers", 0); - /* "pygame/_sprite.pyx":873 + /* "pygame/_sprite.pyx":875 * * """ * return sorted(set(self._spritelayers.values())) # <<<<<<<<<<<<<< @@ -13380,24 +13680,24 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_20layers(struct __py __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelayers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 873, __pyx_L1_error) + __PYX_ERR(0, 875, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_Values(__pyx_v_self->_spritelayers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_Values(__pyx_v_self->_spritelayers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_4 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 875, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":867 + /* "pygame/_sprite.pyx":869 * * #---# layer methods * def layers(self): # <<<<<<<<<<<<<< @@ -13418,7 +13718,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_20layers(struct __py return __pyx_r; } -/* "pygame/_sprite.pyx":875 +/* "pygame/_sprite.pyx":877 * return sorted(set(self._spritelayers.values())) * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< @@ -13432,6 +13732,9 @@ static char __pyx_doc_6pygame_7_sprite_14LayeredUpdates_22change_layer[] = "chan static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_23change_layer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_new_layer = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("change_layer (wrapper)", 0); @@ -13458,11 +13761,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_23change_layer(PyObj case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_layer)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, 1); __PYX_ERR(0, 875, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, 1); __PYX_ERR(0, 877, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "change_layer") < 0)) __PYX_ERR(0, 875, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "change_layer") < 0)) __PYX_ERR(0, 877, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -13475,7 +13778,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_23change_layer(PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 875, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 877, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.change_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -13503,9 +13806,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("change_layer", 0); - /* "pygame/_sprite.pyx":884 + /* "pygame/_sprite.pyx":886 * * """ * sprites = self._spritelist # speedup # <<<<<<<<<<<<<< @@ -13517,7 +13823,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc __pyx_v_sprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":885 + /* "pygame/_sprite.pyx":887 * """ * sprites = self._spritelist # speedup * sprites_layers = self._spritelayers # speedup # <<<<<<<<<<<<<< @@ -13529,18 +13835,18 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc __pyx_v_sprites_layers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":887 + /* "pygame/_sprite.pyx":889 * sprites_layers = self._spritelayers # speedup * * sprites.remove(sprite) # <<<<<<<<<<<<<< * sprites_layers.pop(sprite) * */ - __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_remove, __pyx_v_sprites, __pyx_v_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_remove, __pyx_v_sprites, __pyx_v_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":888 + /* "pygame/_sprite.pyx":890 * * sprites.remove(sprite) * sprites_layers.pop(sprite) # <<<<<<<<<<<<<< @@ -13549,13 +13855,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc */ if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); - __PYX_ERR(0, 888, __pyx_L1_error) + __PYX_ERR(0, 890, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_sprites_layers, __pyx_v_sprite, ((PyObject *)NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Pop(__pyx_v_sprites_layers, __pyx_v_sprite, ((PyObject *)NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":892 + /* "pygame/_sprite.pyx":894 * # add the sprite at the right position * # bisect algorithmus * leng = len(sprites) # <<<<<<<<<<<<<< @@ -13564,15 +13870,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 892, __pyx_L1_error) + __PYX_ERR(0, 894, __pyx_L1_error) } - __pyx_t_2 = PyList_GET_SIZE(__pyx_v_sprites); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 892, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_sprites); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_leng = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":893 + /* "pygame/_sprite.pyx":895 * # bisect algorithmus * leng = len(sprites) * low = mid = 0 # <<<<<<<<<<<<<< @@ -13584,19 +13890,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc __Pyx_INCREF(__pyx_int_0); __pyx_v_mid = __pyx_int_0; - /* "pygame/_sprite.pyx":894 + /* "pygame/_sprite.pyx":896 * leng = len(sprites) * low = mid = 0 * high = leng - 1 # <<<<<<<<<<<<<< * while low <= high: * mid = low + (high - low) // 2 */ - __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_leng, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_leng, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_high = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":895 + /* "pygame/_sprite.pyx":897 * low = mid = 0 * high = leng - 1 * while low <= high: # <<<<<<<<<<<<<< @@ -13604,30 +13910,30 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc * if sprites_layers[sprites[mid]] <= new_layer: */ while (1) { - __pyx_t_1 = PyObject_RichCompare(__pyx_v_low, __pyx_v_high, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_low, __pyx_v_high, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_3) break; - /* "pygame/_sprite.pyx":896 + /* "pygame/_sprite.pyx":898 * high = leng - 1 * while low <= high: * mid = low + (high - low) // 2 # <<<<<<<<<<<<<< * if sprites_layers[sprites[mid]] <= new_layer: * low = mid + 1 */ - __pyx_t_1 = PyNumber_Subtract(__pyx_v_high, __pyx_v_low); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_v_high, __pyx_v_low); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_1, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_1, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_low, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_low, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_mid, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":897 + /* "pygame/_sprite.pyx":899 * while low <= high: * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= new_layer: # <<<<<<<<<<<<<< @@ -13636,36 +13942,36 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc */ if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 897, __pyx_L1_error) + __PYX_ERR(0, 899, __pyx_L1_error) } if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 897, __pyx_L1_error) + __PYX_ERR(0, 899, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_new_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_new_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "pygame/_sprite.pyx":898 + /* "pygame/_sprite.pyx":900 * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= new_layer: * low = mid + 1 # <<<<<<<<<<<<<< * else: * high = mid - 1 */ - __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_low, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":897 + /* "pygame/_sprite.pyx":899 * while low <= high: * mid = low + (high - low) // 2 * if sprites_layers[sprites[mid]] <= new_layer: # <<<<<<<<<<<<<< @@ -13675,7 +13981,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc goto __pyx_L5; } - /* "pygame/_sprite.pyx":900 + /* "pygame/_sprite.pyx":902 * low = mid + 1 * else: * high = mid - 1 # <<<<<<<<<<<<<< @@ -13683,7 +13989,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc * while mid < leng and sprites_layers[sprites[mid]] <= new_layer: */ /*else*/ { - __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_mid, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_high, __pyx_t_1); __pyx_t_1 = 0; @@ -13691,7 +13997,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc __pyx_L5:; } - /* "pygame/_sprite.pyx":902 + /* "pygame/_sprite.pyx":904 * high = mid - 1 * # linear search to find final position * while mid < leng and sprites_layers[sprites[mid]] <= new_layer: # <<<<<<<<<<<<<< @@ -13699,8 +14005,8 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc * sprites.insert(mid, sprite) */ while (1) { - __pyx_t_1 = PyObject_RichCompare(__pyx_v_mid, __pyx_v_leng, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_mid, __pyx_v_leng, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { } else { @@ -13709,39 +14015,39 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc } if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 902, __pyx_L1_error) + __PYX_ERR(0, 904, __pyx_L1_error) } if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 902, __pyx_L1_error) + __PYX_ERR(0, 904, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_sprites, __pyx_v_mid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_sprites_layers, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_new_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_new_layer, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_5; __pyx_L8_bool_binop_done:; if (!__pyx_t_3) break; - /* "pygame/_sprite.pyx":903 + /* "pygame/_sprite.pyx":905 * # linear search to find final position * while mid < leng and sprites_layers[sprites[mid]] <= new_layer: * mid += 1 # <<<<<<<<<<<<<< * sprites.insert(mid, sprite) * if hasattr(sprite, 'layer'): */ - __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_mid, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_mid, __pyx_t_1); __pyx_t_1 = 0; } - /* "pygame/_sprite.pyx":904 + /* "pygame/_sprite.pyx":906 * while mid < leng and sprites_layers[sprites[mid]] <= new_layer: * mid += 1 * sprites.insert(mid, sprite) # <<<<<<<<<<<<<< @@ -13750,32 +14056,32 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc */ if (unlikely(__pyx_v_sprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "insert"); - __PYX_ERR(0, 904, __pyx_L1_error) + __PYX_ERR(0, 906, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_mid); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 904, __pyx_L1_error) - __pyx_t_6 = PyList_Insert(__pyx_v_sprites, __pyx_t_2, __pyx_v_sprite); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_mid); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 906, __pyx_L1_error) + __pyx_t_6 = PyList_Insert(__pyx_v_sprites, __pyx_t_2, __pyx_v_sprite); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 906, __pyx_L1_error) - /* "pygame/_sprite.pyx":905 + /* "pygame/_sprite.pyx":907 * mid += 1 * sprites.insert(mid, sprite) * if hasattr(sprite, 'layer'): # <<<<<<<<<<<<<< * sprite.layer = new_layer * */ - __pyx_t_3 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_layer_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 905, __pyx_L1_error) + __pyx_t_3 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_layer_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 907, __pyx_L1_error) __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":906 + /* "pygame/_sprite.pyx":908 * sprites.insert(mid, sprite) * if hasattr(sprite, 'layer'): * sprite.layer = new_layer # <<<<<<<<<<<<<< * * # add layer info */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_layer_2, __pyx_v_new_layer) < 0) __PYX_ERR(0, 906, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_layer_2, __pyx_v_new_layer) < 0) __PYX_ERR(0, 908, __pyx_L1_error) - /* "pygame/_sprite.pyx":905 + /* "pygame/_sprite.pyx":907 * mid += 1 * sprites.insert(mid, sprite) * if hasattr(sprite, 'layer'): # <<<<<<<<<<<<<< @@ -13784,7 +14090,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc */ } - /* "pygame/_sprite.pyx":909 + /* "pygame/_sprite.pyx":911 * * # add layer info * sprites_layers[sprite] = new_layer # <<<<<<<<<<<<<< @@ -13793,11 +14099,11 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc */ if (unlikely(__pyx_v_sprites_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 909, __pyx_L1_error) + __PYX_ERR(0, 911, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_sprites_layers, __pyx_v_sprite, __pyx_v_new_layer) < 0)) __PYX_ERR(0, 909, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_sprites_layers, __pyx_v_sprite, __pyx_v_new_layer) < 0)) __PYX_ERR(0, 911, __pyx_L1_error) - /* "pygame/_sprite.pyx":875 + /* "pygame/_sprite.pyx":877 * return sorted(set(self._spritelayers.values())) * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< @@ -13825,7 +14131,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_22change_layer(struc return __pyx_r; } -/* "pygame/_sprite.pyx":911 +/* "pygame/_sprite.pyx":913 * sprites_layers[sprite] = new_layer * * def get_layer_of_sprite(self, sprite): # <<<<<<<<<<<<<< @@ -13852,9 +14158,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_24get_layer_of_sprit __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_layer_of_sprite", 0); - /* "pygame/_sprite.pyx":917 + /* "pygame/_sprite.pyx":919 * * """ * return self._spritelayers.get(sprite, self._default_layer) # <<<<<<<<<<<<<< @@ -13864,18 +14173,18 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_24get_layer_of_sprit __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelayers == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 917, __pyx_L1_error) + __PYX_ERR(0, 919, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_default_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_default_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_spritelayers, __pyx_v_sprite, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_spritelayers, __pyx_v_sprite, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":911 + /* "pygame/_sprite.pyx":913 * sprites_layers[sprite] = new_layer * * def get_layer_of_sprite(self, sprite): # <<<<<<<<<<<<<< @@ -13895,7 +14204,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_24get_layer_of_sprit return __pyx_r; } -/* "pygame/_sprite.pyx":919 +/* "pygame/_sprite.pyx":921 * return self._spritelayers.get(sprite, self._default_layer) * * def get_top_layer(self): # <<<<<<<<<<<<<< @@ -13922,9 +14231,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_26get_top_layer(stru __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_top_layer", 0); - /* "pygame/_sprite.pyx":925 + /* "pygame/_sprite.pyx":927 * * """ * return self._spritelayers[self._spritelist[-1]] # <<<<<<<<<<<<<< @@ -13934,22 +14246,22 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_26get_top_layer(stru __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelayers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 925, __pyx_L1_error) + __PYX_ERR(0, 927, __pyx_L1_error) } if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 925, __pyx_L1_error) + __PYX_ERR(0, 927, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->_spritelist, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->_spritelist, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->_spritelayers, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->_spritelayers, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":919 + /* "pygame/_sprite.pyx":921 * return self._spritelayers.get(sprite, self._default_layer) * * def get_top_layer(self): # <<<<<<<<<<<<<< @@ -13969,7 +14281,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_26get_top_layer(stru return __pyx_r; } -/* "pygame/_sprite.pyx":927 +/* "pygame/_sprite.pyx":929 * return self._spritelayers[self._spritelist[-1]] * * def get_bottom_layer(self): # <<<<<<<<<<<<<< @@ -13996,9 +14308,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_28get_bottom_layer(s __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_bottom_layer", 0); - /* "pygame/_sprite.pyx":933 + /* "pygame/_sprite.pyx":935 * * """ * return self._spritelayers[self._spritelist[0]] # <<<<<<<<<<<<<< @@ -14008,22 +14323,22 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_28get_bottom_layer(s __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelayers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 933, __pyx_L1_error) + __PYX_ERR(0, 935, __pyx_L1_error) } if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 933, __pyx_L1_error) + __PYX_ERR(0, 935, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->_spritelist, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->_spritelist, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->_spritelayers, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->_spritelayers, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":927 + /* "pygame/_sprite.pyx":929 * return self._spritelayers[self._spritelist[-1]] * * def get_bottom_layer(self): # <<<<<<<<<<<<<< @@ -14043,7 +14358,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_28get_bottom_layer(s return __pyx_r; } -/* "pygame/_sprite.pyx":935 +/* "pygame/_sprite.pyx":937 * return self._spritelayers[self._spritelist[0]] * * def move_to_front(self, sprite): # <<<<<<<<<<<<<< @@ -14074,18 +14389,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_30move_to_front(stru PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("move_to_front", 0); - /* "pygame/_sprite.pyx":945 + /* "pygame/_sprite.pyx":947 * * """ * self.change_layer(sprite, self.get_top_layer()) # <<<<<<<<<<<<<< * * def move_to_back(self, sprite): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_top_layer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_top_layer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -14099,7 +14417,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_30move_to_front(stru } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -14117,7 +14435,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_30move_to_front(stru #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sprite, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -14126,14 +14444,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_30move_to_front(stru #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sprite, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -14144,14 +14462,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_30move_to_front(stru __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":935 + /* "pygame/_sprite.pyx":937 * return self._spritelayers[self._spritelist[0]] * * def move_to_front(self, sprite): # <<<<<<<<<<<<<< @@ -14176,7 +14494,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_30move_to_front(stru return __pyx_r; } -/* "pygame/_sprite.pyx":947 +/* "pygame/_sprite.pyx":949 * self.change_layer(sprite, self.get_top_layer()) * * def move_to_back(self, sprite): # <<<<<<<<<<<<<< @@ -14207,18 +14525,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_32move_to_back(struc PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("move_to_back", 0); - /* "pygame/_sprite.pyx":956 + /* "pygame/_sprite.pyx":958 * * """ * self.change_layer(sprite, self.get_bottom_layer() - 1) # <<<<<<<<<<<<<< * * def get_top_sprite(self): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_bottom_layer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_bottom_layer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -14232,10 +14553,10 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_32move_to_back(struc } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 956, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -14253,7 +14574,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_32move_to_back(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_sprite, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -14262,14 +14583,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_32move_to_back(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_sprite, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -14280,14 +14601,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_32move_to_back(struc __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":947 + /* "pygame/_sprite.pyx":949 * self.change_layer(sprite, self.get_top_layer()) * * def move_to_back(self, sprite): # <<<<<<<<<<<<<< @@ -14312,7 +14633,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_32move_to_back(struc return __pyx_r; } -/* "pygame/_sprite.pyx":958 +/* "pygame/_sprite.pyx":960 * self.change_layer(sprite, self.get_bottom_layer() - 1) * * def get_top_sprite(self): # <<<<<<<<<<<<<< @@ -14338,9 +14659,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_34get_top_sprite(str PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_top_sprite", 0); - /* "pygame/_sprite.pyx":964 + /* "pygame/_sprite.pyx":966 * * """ * return self._spritelist[-1] # <<<<<<<<<<<<<< @@ -14350,15 +14674,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_34get_top_sprite(str __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 964, __pyx_L1_error) + __PYX_ERR(0, 966, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->_spritelist, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->_spritelist, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":958 + /* "pygame/_sprite.pyx":960 * self.change_layer(sprite, self.get_bottom_layer() - 1) * * def get_top_sprite(self): # <<<<<<<<<<<<<< @@ -14377,7 +14701,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_34get_top_sprite(str return __pyx_r; } -/* "pygame/_sprite.pyx":966 +/* "pygame/_sprite.pyx":968 * return self._spritelist[-1] * * def get_sprites_from_layer(self, layer): # <<<<<<<<<<<<<< @@ -14412,33 +14736,36 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sprites_from_layer", 0); - /* "pygame/_sprite.pyx":976 + /* "pygame/_sprite.pyx":978 * * """ * sprites = [] # <<<<<<<<<<<<<< * sprites_append = sprites.append * sprite_layers = self._spritelayers */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":977 + /* "pygame/_sprite.pyx":979 * """ * sprites = [] * sprites_append = sprites.append # <<<<<<<<<<<<<< * sprite_layers = self._spritelayers * for spr in self._spritelist: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprites, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprites, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sprites_append = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":978 + /* "pygame/_sprite.pyx":980 * sprites = [] * sprites_append = sprites.append * sprite_layers = self._spritelayers # <<<<<<<<<<<<<< @@ -14450,7 +14777,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l __pyx_v_sprite_layers = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":979 + /* "pygame/_sprite.pyx":981 * sprites_append = sprites.append * sprite_layers = self._spritelayers * for spr in self._spritelist: # <<<<<<<<<<<<<< @@ -14459,21 +14786,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l */ if (unlikely(__pyx_v_self->_spritelist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 979, __pyx_L1_error) + __PYX_ERR(0, 981, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->_spritelist; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 981, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":980 + /* "pygame/_sprite.pyx":982 * sprite_layers = self._spritelayers * for spr in self._spritelist: * if sprite_layers[spr] == layer: # <<<<<<<<<<<<<< @@ -14482,26 +14809,26 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l */ if (unlikely(__pyx_v_sprite_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 980, __pyx_L1_error) + __PYX_ERR(0, 982, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_sprite_layers, __pyx_v_spr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 980, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_sprite_layers, __pyx_v_spr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_layer, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_layer, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 980, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "pygame/_sprite.pyx":981 + /* "pygame/_sprite.pyx":983 * for spr in self._spritelist: * if sprite_layers[spr] == layer: * sprites_append(spr) # <<<<<<<<<<<<<< * elif sprite_layers[spr] > layer:# break after because no other will * # follow with same layer */ - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_sprites, __pyx_v_spr); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 981, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_sprites, __pyx_v_spr); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 983, __pyx_L1_error) - /* "pygame/_sprite.pyx":980 + /* "pygame/_sprite.pyx":982 * sprite_layers = self._spritelayers * for spr in self._spritelist: * if sprite_layers[spr] == layer: # <<<<<<<<<<<<<< @@ -14511,7 +14838,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l goto __pyx_L5; } - /* "pygame/_sprite.pyx":982 + /* "pygame/_sprite.pyx":984 * if sprite_layers[spr] == layer: * sprites_append(spr) * elif sprite_layers[spr] > layer:# break after because no other will # <<<<<<<<<<<<<< @@ -14520,17 +14847,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l */ if (unlikely(__pyx_v_sprite_layers == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 982, __pyx_L1_error) + __PYX_ERR(0, 984, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_sprite_layers, __pyx_v_spr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_sprite_layers, __pyx_v_spr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_v_layer, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_v_layer, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { - /* "pygame/_sprite.pyx":984 + /* "pygame/_sprite.pyx":986 * elif sprite_layers[spr] > layer:# break after because no other will * # follow with same layer * break # <<<<<<<<<<<<<< @@ -14539,7 +14866,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l */ goto __pyx_L4_break; - /* "pygame/_sprite.pyx":982 + /* "pygame/_sprite.pyx":984 * if sprite_layers[spr] == layer: * sprites_append(spr) * elif sprite_layers[spr] > layer:# break after because no other will # <<<<<<<<<<<<<< @@ -14549,7 +14876,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l } __pyx_L5:; - /* "pygame/_sprite.pyx":979 + /* "pygame/_sprite.pyx":981 * sprites_append = sprites.append * sprite_layers = self._spritelayers * for spr in self._spritelist: # <<<<<<<<<<<<<< @@ -14560,7 +14887,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l __pyx_L4_break:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":985 + /* "pygame/_sprite.pyx":987 * # follow with same layer * break * return sprites # <<<<<<<<<<<<<< @@ -14572,7 +14899,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l __pyx_r = __pyx_v_sprites; goto __pyx_L0; - /* "pygame/_sprite.pyx":966 + /* "pygame/_sprite.pyx":968 * return self._spritelist[-1] * * def get_sprites_from_layer(self, layer): # <<<<<<<<<<<<<< @@ -14597,7 +14924,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_36get_sprites_from_l return __pyx_r; } -/* "pygame/_sprite.pyx":987 +/* "pygame/_sprite.pyx":989 * return sprites * * def switch_layer(self, layer1_nr, layer2_nr): # <<<<<<<<<<<<<< @@ -14611,6 +14938,9 @@ static char __pyx_doc_6pygame_7_sprite_14LayeredUpdates_38switch_layer[] = "swit static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_39switch_layer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_layer1_nr = 0; PyObject *__pyx_v_layer2_nr = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("switch_layer (wrapper)", 0); @@ -14637,11 +14967,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_39switch_layer(PyObj case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_layer2_nr)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("switch_layer", 1, 2, 2, 1); __PYX_ERR(0, 987, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("switch_layer", 1, 2, 2, 1); __PYX_ERR(0, 989, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "switch_layer") < 0)) __PYX_ERR(0, 987, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "switch_layer") < 0)) __PYX_ERR(0, 989, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -14654,7 +14984,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_14LayeredUpdates_39switch_layer(PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("switch_layer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 987, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("switch_layer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 989, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.LayeredUpdates.switch_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -14680,16 +15010,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("switch_layer", 0); - /* "pygame/_sprite.pyx":996 + /* "pygame/_sprite.pyx":998 * * """ * sprites1 = self.remove_sprites_of_layer(layer1_nr) # <<<<<<<<<<<<<< * for spr in self.get_sprites_from_layer(layer2_nr): * self.change_layer(spr, layer1_nr) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_sprites_of_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_sprites_of_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -14703,20 +15036,20 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_layer1_nr) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_layer1_nr); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_sprites1 = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":997 + /* "pygame/_sprite.pyx":999 * """ * sprites1 = self.remove_sprites_of_layer(layer1_nr) * for spr in self.get_sprites_from_layer(layer2_nr): # <<<<<<<<<<<<<< * self.change_layer(spr, layer1_nr) * self.add(layer=layer2_nr, *sprites1) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_sprites_from_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_sprites_from_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -14730,16 +15063,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_layer2_nr) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_layer2_nr); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 997, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 999, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -14747,17 +15080,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 997, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 999, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 997, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 999, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -14767,7 +15100,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 997, __pyx_L1_error) + else __PYX_ERR(0, 999, __pyx_L1_error) } break; } @@ -14776,14 +15109,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":998 + /* "pygame/_sprite.pyx":1000 * sprites1 = self.remove_sprites_of_layer(layer1_nr) * for spr in self.get_sprites_from_layer(layer2_nr): * self.change_layer(spr, layer1_nr) # <<<<<<<<<<<<<< * self.add(layer=layer2_nr, *sprites1) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -14800,7 +15133,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_spr, __pyx_v_layer1_nr}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -14808,13 +15141,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_spr, __pyx_v_layer1_nr}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -14825,14 +15158,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc __Pyx_INCREF(__pyx_v_layer1_nr); __Pyx_GIVEREF(__pyx_v_layer1_nr); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_layer1_nr); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":997 + /* "pygame/_sprite.pyx":999 * """ * sprites1 = self.remove_sprites_of_layer(layer1_nr) * for spr in self.get_sprites_from_layer(layer2_nr): # <<<<<<<<<<<<<< @@ -14842,28 +15175,28 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":999 + /* "pygame/_sprite.pyx":1001 * for spr in self.get_sprites_from_layer(layer2_nr): * self.change_layer(spr, layer1_nr) * self.add(layer=layer2_nr, *sprites1) # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_sprites1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_sprites1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_layer_2, __pyx_v_layer2_nr) < 0) __PYX_ERR(0, 999, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 999, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_layer_2, __pyx_v_layer2_nr) < 0) __PYX_ERR(0, 1001, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "pygame/_sprite.pyx":987 + /* "pygame/_sprite.pyx":989 * return sprites * * def switch_layer(self, layer1_nr, layer2_nr): # <<<<<<<<<<<<<< @@ -14890,7 +15223,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_38switch_layer(struc return __pyx_r; } -/* "pygame/_sprite.pyx":673 +/* "pygame/_sprite.pyx":675 * _init_rect = Rect(0, 0, 0, 0) * * cdef public dict _spritelayers # <<<<<<<<<<<<<< @@ -14944,8 +15277,11 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_2__set__(s int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 673, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 675, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -14995,7 +15331,7 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_13_spritelayers_4__del__(s return __pyx_r; } -/* "pygame/_sprite.pyx":674 +/* "pygame/_sprite.pyx":676 * * cdef public dict _spritelayers * cdef public list _spritelist # <<<<<<<<<<<<<< @@ -15049,8 +15385,11 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist_2__set__(str int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 674, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 676, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -15100,7 +15439,7 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_11_spritelist_4__del__(str return __pyx_r; } -/* "pygame/_sprite.pyx":675 +/* "pygame/_sprite.pyx":677 * cdef public dict _spritelayers * cdef public list _spritelist * cdef public int _default_layer # <<<<<<<<<<<<<< @@ -15125,9 +15464,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_14_default_layer___g PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_default_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_default_layer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15161,8 +15503,11 @@ static int __pyx_pf_6pygame_7_sprite_14LayeredUpdates_14_default_layer_2__set__( int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 675, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error) __pyx_v_self->_default_layer = __pyx_t_1; /* function exit code */ @@ -15199,6 +15544,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_40__reduce_cython__( PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -15253,6 +15601,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_42__setstate_cython_ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -15283,7 +15634,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_14LayeredUpdates_42__setstate_cython_ return __pyx_r; } -/* "pygame/_sprite.pyx":1034 +/* "pygame/_sprite.pyx":1036 * cdef public object _bgd * * def __init__(self, *sprites, **kwargs): # <<<<<<<<<<<<<< @@ -15325,40 +15676,46 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); - PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sprite.pyx":1048 + /* "pygame/_sprite.pyx":1050 * * """ * LayeredUpdates.__init__(self, *sprites, **kwargs) # <<<<<<<<<<<<<< * self._clip = None * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1048, __pyx_L1_error) + __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1050, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "pygame/_sprite.pyx":1049 + /* "pygame/_sprite.pyx":1051 * """ * LayeredUpdates.__init__(self, *sprites, **kwargs) * self._clip = None # <<<<<<<<<<<<<< @@ -15371,7 +15728,7 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p __Pyx_DECREF(((PyObject *)__pyx_v_self->_clip)); __pyx_v_self->_clip = ((pgRectObject *)Py_None); - /* "pygame/_sprite.pyx":1051 + /* "pygame/_sprite.pyx":1053 * self._clip = None * * self._use_update = False # <<<<<<<<<<<<<< @@ -15380,7 +15737,7 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p */ __pyx_v_self->_use_update = 0; - /* "pygame/_sprite.pyx":1053 + /* "pygame/_sprite.pyx":1055 * self._use_update = False * * self._time_threshold = 1000.0 / 80.0 # 1000.0 / fps # <<<<<<<<<<<<<< @@ -15389,7 +15746,7 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p */ __pyx_v_self->_time_threshold = (1000.0 / 80.0); - /* "pygame/_sprite.pyx":1055 + /* "pygame/_sprite.pyx":1057 * self._time_threshold = 1000.0 / 80.0 # 1000.0 / fps * * self._bgd = None # <<<<<<<<<<<<<< @@ -15402,91 +15759,91 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p __Pyx_DECREF(__pyx_v_self->_bgd); __pyx_v_self->_bgd = Py_None; - /* "pygame/_sprite.pyx":1056 + /* "pygame/_sprite.pyx":1058 * * self._bgd = None * for key, val in kwargs.items(): # <<<<<<<<<<<<<< * if key in ['_use_update', '_time_threshold', '_default_layer']: * if hasattr(self, key): */ - __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { - __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; - __pyx_t_5 = NULL; + __pyx_t_4 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; + __pyx_t_6 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1058, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - if (likely(!__pyx_t_5)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; + if (likely(!__pyx_t_6)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1058, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1058, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_2 = __pyx_t_5(__pyx_t_3); - if (unlikely(!__pyx_t_2)) { + __pyx_t_4 = __pyx_t_6(__pyx_t_2); + if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1056, __pyx_L1_error) + else __PYX_ERR(0, 1058, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_4); } - if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { - PyObject* sequence = __pyx_t_2; + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1056, __pyx_L1_error) + __PYX_ERR(0, 1058, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_1 = PyList_GET_ITEM(sequence, 0); - __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1056, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); #endif - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; - index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; + index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); - index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; - __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1056, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1058, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -15494,15 +15851,15 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1056, __pyx_L1_error) + __PYX_ERR(0, 1058, __pyx_L1_error) __pyx_L6_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1); + __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3); + __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); - __pyx_t_6 = 0; - /* "pygame/_sprite.pyx":1057 + /* "pygame/_sprite.pyx":1059 * self._bgd = None * for key, val in kwargs.items(): * if key in ['_use_update', '_time_threshold', '_default_layer']: # <<<<<<<<<<<<<< @@ -15510,47 +15867,47 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p * setattr(self, key, val) */ __Pyx_INCREF(__pyx_v_key); - __pyx_t_2 = __pyx_v_key; - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_use_update, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1057, __pyx_L1_error) + __pyx_t_4 = __pyx_v_key; + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_use_update, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1059, __pyx_L1_error) if (!__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L8_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_time_threshold, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1057, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_time_threshold, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1059, __pyx_L1_error) if (!__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L8_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_default_layer_2, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1057, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_default_layer_2, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1059, __pyx_L1_error) __pyx_t_9 = __pyx_t_10; __pyx_L8_bool_binop_done:; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "pygame/_sprite.pyx":1058 + /* "pygame/_sprite.pyx":1060 * for key, val in kwargs.items(): * if key in ['_use_update', '_time_threshold', '_default_layer']: * if hasattr(self, key): # <<<<<<<<<<<<<< * setattr(self, key, val) * */ - __pyx_t_10 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1058, __pyx_L1_error) + __pyx_t_10 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_v_key); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1060, __pyx_L1_error) __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "pygame/_sprite.pyx":1059 + /* "pygame/_sprite.pyx":1061 * if key in ['_use_update', '_time_threshold', '_default_layer']: * if hasattr(self, key): * setattr(self, key, val) # <<<<<<<<<<<<<< * * cpdef void add_internal(self, sprite, layer=None): */ - __pyx_t_11 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_key, __pyx_v_val); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_11 = PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_v_key, __pyx_v_val); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1061, __pyx_L1_error) - /* "pygame/_sprite.pyx":1058 + /* "pygame/_sprite.pyx":1060 * for key, val in kwargs.items(): * if key in ['_use_update', '_time_threshold', '_default_layer']: * if hasattr(self, key): # <<<<<<<<<<<<<< @@ -15559,7 +15916,7 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p */ } - /* "pygame/_sprite.pyx":1057 + /* "pygame/_sprite.pyx":1059 * self._bgd = None * for key, val in kwargs.items(): * if key in ['_use_update', '_time_threshold', '_default_layer']: # <<<<<<<<<<<<<< @@ -15568,7 +15925,7 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p */ } - /* "pygame/_sprite.pyx":1056 + /* "pygame/_sprite.pyx":1058 * * self._bgd = None * for key, val in kwargs.items(): # <<<<<<<<<<<<<< @@ -15576,9 +15933,9 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p * if hasattr(self, key): */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1034 + /* "pygame/_sprite.pyx":1036 * cdef public object _bgd * * def __init__(self, *sprites, **kwargs): # <<<<<<<<<<<<<< @@ -15593,7 +15950,7 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pygame._sprite.LayeredDirty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; @@ -15604,7 +15961,7 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty___init__(struct __pyx_obj_6p return __pyx_r; } -/* "pygame/_sprite.pyx":1061 +/* "pygame/_sprite.pyx":1063 * setattr(self, key, val) * * cpdef void add_internal(self, sprite, layer=None): # <<<<<<<<<<<<<< @@ -15625,6 +15982,9 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga int __pyx_t_7; int __pyx_t_8; struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { @@ -15640,7 +16000,7 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_12LayeredDirty_3add_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -15659,7 +16019,7 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sprite, __pyx_v_layer}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -15667,13 +16027,13 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sprite, __pyx_v_layer}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -15684,7 +16044,7 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga __Pyx_INCREF(__pyx_v_layer); __Pyx_GIVEREF(__pyx_v_layer); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_layer); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -15706,31 +16066,31 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga #endif } - /* "pygame/_sprite.pyx":1068 + /* "pygame/_sprite.pyx":1070 * """ * # check if all needed attributes are set * if not hasattr(sprite, 'dirty'): # <<<<<<<<<<<<<< * raise AttributeError() * if not hasattr(sprite, 'visible'): */ - __pyx_t_7 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_dirty); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_7 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_dirty); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1070, __pyx_L1_error) __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0); if (unlikely(__pyx_t_8)) { - /* "pygame/_sprite.pyx":1069 + /* "pygame/_sprite.pyx":1071 * # check if all needed attributes are set * if not hasattr(sprite, 'dirty'): * raise AttributeError() # <<<<<<<<<<<<<< * if not hasattr(sprite, 'visible'): * raise AttributeError() */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1069, __pyx_L1_error) + __PYX_ERR(0, 1071, __pyx_L1_error) - /* "pygame/_sprite.pyx":1068 + /* "pygame/_sprite.pyx":1070 * """ * # check if all needed attributes are set * if not hasattr(sprite, 'dirty'): # <<<<<<<<<<<<<< @@ -15739,31 +16099,31 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga */ } - /* "pygame/_sprite.pyx":1070 + /* "pygame/_sprite.pyx":1072 * if not hasattr(sprite, 'dirty'): * raise AttributeError() * if not hasattr(sprite, 'visible'): # <<<<<<<<<<<<<< * raise AttributeError() * if not hasattr(sprite, 'blendmode'): */ - __pyx_t_8 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_visible_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1070, __pyx_L1_error) + __pyx_t_8 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_visible_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1072, __pyx_L1_error) __pyx_t_7 = ((!(__pyx_t_8 != 0)) != 0); if (unlikely(__pyx_t_7)) { - /* "pygame/_sprite.pyx":1071 + /* "pygame/_sprite.pyx":1073 * raise AttributeError() * if not hasattr(sprite, 'visible'): * raise AttributeError() # <<<<<<<<<<<<<< * if not hasattr(sprite, 'blendmode'): * raise AttributeError() */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1071, __pyx_L1_error) + __PYX_ERR(0, 1073, __pyx_L1_error) - /* "pygame/_sprite.pyx":1070 + /* "pygame/_sprite.pyx":1072 * if not hasattr(sprite, 'dirty'): * raise AttributeError() * if not hasattr(sprite, 'visible'): # <<<<<<<<<<<<<< @@ -15772,31 +16132,31 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga */ } - /* "pygame/_sprite.pyx":1072 + /* "pygame/_sprite.pyx":1074 * if not hasattr(sprite, 'visible'): * raise AttributeError() * if not hasattr(sprite, 'blendmode'): # <<<<<<<<<<<<<< * raise AttributeError() * */ - __pyx_t_7 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_blendmode); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_7 = __Pyx_HasAttr(__pyx_v_sprite, __pyx_n_s_blendmode); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1074, __pyx_L1_error) __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0); if (unlikely(__pyx_t_8)) { - /* "pygame/_sprite.pyx":1073 + /* "pygame/_sprite.pyx":1075 * raise AttributeError() * if not hasattr(sprite, 'blendmode'): * raise AttributeError() # <<<<<<<<<<<<<< * * if not isinstance(sprite, DirtySprite): */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1073, __pyx_L1_error) + __PYX_ERR(0, 1075, __pyx_L1_error) - /* "pygame/_sprite.pyx":1072 + /* "pygame/_sprite.pyx":1074 * if not hasattr(sprite, 'visible'): * raise AttributeError() * if not hasattr(sprite, 'blendmode'): # <<<<<<<<<<<<<< @@ -15805,34 +16165,34 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga */ } - /* "pygame/_sprite.pyx":1075 + /* "pygame/_sprite.pyx":1077 * raise AttributeError() * * if not isinstance(sprite, DirtySprite): # <<<<<<<<<<<<<< * raise TypeError() * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DirtySprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DirtySprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyObject_IsInstance(__pyx_v_sprite, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1075, __pyx_L1_error) + __pyx_t_8 = PyObject_IsInstance(__pyx_v_sprite, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1077, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = ((!(__pyx_t_8 != 0)) != 0); if (unlikely(__pyx_t_7)) { - /* "pygame/_sprite.pyx":1076 + /* "pygame/_sprite.pyx":1078 * * if not isinstance(sprite, DirtySprite): * raise TypeError() # <<<<<<<<<<<<<< * * if sprite.dirty == 0: # set it dirty if it is not */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_TypeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_TypeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1076, __pyx_L1_error) + __PYX_ERR(0, 1078, __pyx_L1_error) - /* "pygame/_sprite.pyx":1075 + /* "pygame/_sprite.pyx":1077 * raise AttributeError() * * if not isinstance(sprite, DirtySprite): # <<<<<<<<<<<<<< @@ -15841,32 +16201,32 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga */ } - /* "pygame/_sprite.pyx":1078 + /* "pygame/_sprite.pyx":1080 * raise TypeError() * * if sprite.dirty == 0: # set it dirty if it is not # <<<<<<<<<<<<<< * sprite.dirty = 1 * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { - /* "pygame/_sprite.pyx":1079 + /* "pygame/_sprite.pyx":1081 * * if sprite.dirty == 0: # set it dirty if it is not * sprite.dirty = 1 # <<<<<<<<<<<<<< * * LayeredUpdates.add_internal(self, sprite, layer) */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 1079, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 1081, __pyx_L1_error) - /* "pygame/_sprite.pyx":1078 + /* "pygame/_sprite.pyx":1080 * raise TypeError() * * if sprite.dirty == 0: # set it dirty if it is not # <<<<<<<<<<<<<< @@ -15875,7 +16235,7 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga */ } - /* "pygame/_sprite.pyx":1081 + /* "pygame/_sprite.pyx":1083 * sprite.dirty = 1 * * LayeredUpdates.add_internal(self, sprite, layer) # <<<<<<<<<<<<<< @@ -15886,7 +16246,7 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(struct __pyx_obj_6pyga __pyx_t_9.layer = __pyx_v_layer; __pyx_vtabptr_6pygame_7_sprite_LayeredUpdates->add_internal(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprite, 1, &__pyx_t_9); - /* "pygame/_sprite.pyx":1061 + /* "pygame/_sprite.pyx":1063 * setattr(self, key, val) * * cpdef void add_internal(self, sprite, layer=None): # <<<<<<<<<<<<<< @@ -15913,6 +16273,9 @@ static char __pyx_doc_6pygame_7_sprite_12LayeredDirty_2add_internal[] = "Do not static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_3add_internal(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_layer = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_internal (wrapper)", 0); @@ -15944,7 +16307,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_3add_internal(PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_internal") < 0)) __PYX_ERR(0, 1061, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_internal") < 0)) __PYX_ERR(0, 1063, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -15960,7 +16323,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_3add_internal(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_internal", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1061, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_internal", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1063, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty.add_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -15978,12 +16341,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_2add_internal(struct _ __Pyx_RefNannyDeclarations struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1.__pyx_n = 1; __pyx_t_1.layer = __pyx_v_layer; __pyx_vtabptr_6pygame_7_sprite_LayeredDirty->__pyx_base.add_internal(((struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *)__pyx_v_self), __pyx_v_sprite, 1, &__pyx_t_1); - __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -16004,7 +16370,7 @@ void __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal__pyx_wrap_1(struct __p __pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal(__pyx_v_self, __pyx_v_sprite, __pyx_skip_dispatch, NULL); } -/* "pygame/_sprite.pyx":1083 +/* "pygame/_sprite.pyx":1085 * LayeredUpdates.add_internal(self, sprite, layer) * * def draw(self, surface, bgd=None): # <<<<<<<<<<<<<< @@ -16018,6 +16384,9 @@ static char __pyx_doc_6pygame_7_sprite_12LayeredDirty_4draw[] = "draw all sprite static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_5draw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_surface = 0; PyObject *__pyx_v_bgd = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("draw (wrapper)", 0); @@ -16049,7 +16418,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_5draw(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 1083, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "draw") < 0)) __PYX_ERR(0, 1085, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -16065,7 +16434,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_5draw(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1083, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("draw", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1085, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty.draw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -16123,16 +16492,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("draw", 0); - /* "pygame/_sprite.pyx":1093 + /* "pygame/_sprite.pyx":1095 * """ * # speedups * _orig_clip = surface.get_clip() # <<<<<<<<<<<<<< * _clip = self._clip * if _clip is None: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_get_clip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_get_clip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16146,13 +16518,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v__orig_clip = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1094 + /* "pygame/_sprite.pyx":1096 * # speedups * _orig_clip = surface.get_clip() * _clip = self._clip # <<<<<<<<<<<<<< @@ -16164,7 +16536,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_v__clip = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1095 + /* "pygame/_sprite.pyx":1097 * _orig_clip = surface.get_clip() * _clip = self._clip * if _clip is None: # <<<<<<<<<<<<<< @@ -16175,7 +16547,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":1096 + /* "pygame/_sprite.pyx":1098 * _clip = self._clip * if _clip is None: * _clip = _orig_clip # <<<<<<<<<<<<<< @@ -16185,7 +16557,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __Pyx_INCREF(__pyx_v__orig_clip); __Pyx_DECREF_SET(__pyx_v__clip, __pyx_v__orig_clip); - /* "pygame/_sprite.pyx":1095 + /* "pygame/_sprite.pyx":1097 * _orig_clip = surface.get_clip() * _clip = self._clip * if _clip is None: # <<<<<<<<<<<<<< @@ -16194,7 +16566,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1098 + /* "pygame/_sprite.pyx":1100 * _clip = _orig_clip * * _surf = surface # <<<<<<<<<<<<<< @@ -16204,7 +16576,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __Pyx_INCREF(__pyx_v_surface); __pyx_v__surf = __pyx_v_surface; - /* "pygame/_sprite.pyx":1099 + /* "pygame/_sprite.pyx":1101 * * _surf = surface * _sprites = self._spritelist # <<<<<<<<<<<<<< @@ -16216,7 +16588,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_v__sprites = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1100 + /* "pygame/_sprite.pyx":1102 * _surf = surface * _sprites = self._spritelist * _old_rect = self.spritedict # <<<<<<<<<<<<<< @@ -16228,7 +16600,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_v__old_rect = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1101 + /* "pygame/_sprite.pyx":1103 * _sprites = self._spritelist * _old_rect = self.spritedict * _update = self.lostsprites # <<<<<<<<<<<<<< @@ -16240,19 +16612,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_v__update = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1102 + /* "pygame/_sprite.pyx":1104 * _old_rect = self.spritedict * _update = self.lostsprites * _update_append = _update.append # <<<<<<<<<<<<<< * _ret = None * _surf_blit = _surf.blit */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__update, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__update, __pyx_n_s_append); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__update_append = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1103 + /* "pygame/_sprite.pyx":1105 * _update = self.lostsprites * _update_append = _update.append * _ret = None # <<<<<<<<<<<<<< @@ -16262,19 +16634,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __Pyx_INCREF(Py_None); __pyx_v__ret = ((PyObject*)Py_None); - /* "pygame/_sprite.pyx":1104 + /* "pygame/_sprite.pyx":1106 * _update_append = _update.append * _ret = None * _surf_blit = _surf.blit # <<<<<<<<<<<<<< * _rect = Rect * if bgd is not None: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__surf, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__surf, __pyx_n_s_blit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__surf_blit = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1105 + /* "pygame/_sprite.pyx":1107 * _ret = None * _surf_blit = _surf.blit * _rect = Rect # <<<<<<<<<<<<<< @@ -16284,7 +16656,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __Pyx_INCREF(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect)); __pyx_v__rect = __pyx_ptype_6pygame_5_sdl2_5video_Rect; - /* "pygame/_sprite.pyx":1106 + /* "pygame/_sprite.pyx":1108 * _surf_blit = _surf.blit * _rect = Rect * if bgd is not None: # <<<<<<<<<<<<<< @@ -16295,7 +16667,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1107 + /* "pygame/_sprite.pyx":1109 * _rect = Rect * if bgd is not None: * self._bgd = bgd # <<<<<<<<<<<<<< @@ -16308,7 +16680,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->_bgd); __pyx_v_self->_bgd = __pyx_v_bgd; - /* "pygame/_sprite.pyx":1106 + /* "pygame/_sprite.pyx":1108 * _surf_blit = _surf.blit * _rect = Rect * if bgd is not None: # <<<<<<<<<<<<<< @@ -16317,7 +16689,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1108 + /* "pygame/_sprite.pyx":1110 * if bgd is not None: * self._bgd = bgd * _bgd = self._bgd # <<<<<<<<<<<<<< @@ -16329,26 +16701,26 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_v__bgd = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1109 + /* "pygame/_sprite.pyx":1111 * self._bgd = bgd * _bgd = self._bgd * init_rect = self._init_rect # <<<<<<<<<<<<<< * * _surf.set_clip(_clip) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_init_rect = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1111 + /* "pygame/_sprite.pyx":1113 * init_rect = self._init_rect * * _surf.set_clip(_clip) # <<<<<<<<<<<<<< * # ------- * # 0. decide whether to render with update or flip */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__surf, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__surf, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16362,19 +16734,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v__clip) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v__clip); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1114 + /* "pygame/_sprite.pyx":1116 * # ------- * # 0. decide whether to render with update or flip * start_time = get_ticks() # <<<<<<<<<<<<<< * if self._use_update: # dirty rects mode * # 1. find dirty area on screen and put the rects into _update */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_ticks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1114, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_ticks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -16388,13 +16760,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_start_time = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1115 + /* "pygame/_sprite.pyx":1117 * # 0. decide whether to render with update or flip * start_time = get_ticks() * if self._use_update: # dirty rects mode # <<<<<<<<<<<<<< @@ -16404,7 +16776,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_4 = (__pyx_v_self->_use_update != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1118 + /* "pygame/_sprite.pyx":1120 * # 1. find dirty area on screen and put the rects into _update * # still not happy with that part * for spr in _sprites: # <<<<<<<<<<<<<< @@ -16413,82 +16785,82 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1118, __pyx_L1_error) + __PYX_ERR(0, 1120, __pyx_L1_error) } __pyx_t_1 = __pyx_v__sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1118, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1120, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1118, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1119 + /* "pygame/_sprite.pyx":1121 * # still not happy with that part * for spr in _sprites: * if 0 < spr.dirty: # <<<<<<<<<<<<<< * # chose the right rect * if spr.source_rect: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_dirty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_dirty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_int_0, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_int_0, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1121 + /* "pygame/_sprite.pyx":1123 * if 0 < spr.dirty: * # chose the right rect * if spr.source_rect: # <<<<<<<<<<<<<< * _union_rect = _rect(spr.rect.topleft, * spr.source_rect.size) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1121, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1121, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1122 + /* "pygame/_sprite.pyx":1124 * # chose the right rect * if spr.source_rect: * _union_rect = _rect(spr.rect.topleft, # <<<<<<<<<<<<<< * spr.source_rect.size) * else: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_topleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_topleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1123 + /* "pygame/_sprite.pyx":1125 * if spr.source_rect: * _union_rect = _rect(spr.rect.topleft, * spr.source_rect.size) # <<<<<<<<<<<<<< * else: * _union_rect = _rect(spr.rect) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1123, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1123, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1122 + /* "pygame/_sprite.pyx":1124 * # chose the right rect * if spr.source_rect: * _union_rect = _rect(spr.rect.topleft, # <<<<<<<<<<<<<< * spr.source_rect.size) * else: */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -16496,13 +16868,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7); __pyx_t_2 = 0; __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_v__rect), __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_v__rect), __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v__union_rect, __pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":1121 + /* "pygame/_sprite.pyx":1123 * if 0 < spr.dirty: * # chose the right rect * if spr.source_rect: # <<<<<<<<<<<<<< @@ -16512,7 +16884,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj goto __pyx_L9; } - /* "pygame/_sprite.pyx":1125 + /* "pygame/_sprite.pyx":1127 * spr.source_rect.size) * else: * _union_rect = _rect(spr.rect) # <<<<<<<<<<<<<< @@ -16520,9 +16892,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj * _union_rect_collidelist = _union_rect.collidelist */ /*else*/ { - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v__rect), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v__rect), __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v__union_rect, __pyx_t_3); @@ -16530,31 +16902,31 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_L9:; - /* "pygame/_sprite.pyx":1127 + /* "pygame/_sprite.pyx":1129 * _union_rect = _rect(spr.rect) * * _union_rect_collidelist = _union_rect.collidelist # <<<<<<<<<<<<<< * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_collidelist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1127, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_collidelist); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v__union_rect_collidelist, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1128 + /* "pygame/_sprite.pyx":1130 * * _union_rect_collidelist = _union_rect.collidelist * _union_rect_union_ip = _union_rect.union_ip # <<<<<<<<<<<<<< * i = _union_rect_collidelist(_update) * while -1 < i: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_union_ip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_union_ip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v__union_rect_union_ip, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1129 + /* "pygame/_sprite.pyx":1131 * _union_rect_collidelist = _union_rect.collidelist * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) # <<<<<<<<<<<<<< @@ -16574,13 +16946,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_v__update) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v__update); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1130 + /* "pygame/_sprite.pyx":1132 * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) * while -1 < i: # <<<<<<<<<<<<<< @@ -16588,12 +16960,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj * del _update[i] */ while (1) { - __pyx_t_3 = PyObject_RichCompare(__pyx_int_neg_1, __pyx_v_i, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_int_neg_1, __pyx_v_i, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_4) break; - /* "pygame/_sprite.pyx":1131 + /* "pygame/_sprite.pyx":1133 * i = _union_rect_collidelist(_update) * while -1 < i: * _union_rect_union_ip(_update[i]) # <<<<<<<<<<<<<< @@ -16602,9 +16974,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1131, __pyx_L1_error) + __PYX_ERR(0, 1133, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v__update, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1131, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v__update, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v__union_rect_union_ip); __pyx_t_2 = __pyx_v__union_rect_union_ip; __pyx_t_8 = NULL; @@ -16620,12 +16992,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1132 + /* "pygame/_sprite.pyx":1134 * while -1 < i: * _union_rect_union_ip(_update[i]) * del _update[i] # <<<<<<<<<<<<<< @@ -16634,11 +17006,11 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1132, __pyx_L1_error) + __PYX_ERR(0, 1134, __pyx_L1_error) } - if (unlikely(PyObject_DelItem(__pyx_v__update, __pyx_v_i) < 0)) __PYX_ERR(0, 1132, __pyx_L1_error) + if (unlikely(PyObject_DelItem(__pyx_v__update, __pyx_v_i) < 0)) __PYX_ERR(0, 1134, __pyx_L1_error) - /* "pygame/_sprite.pyx":1133 + /* "pygame/_sprite.pyx":1135 * _union_rect_union_ip(_update[i]) * del _update[i] * i = _union_rect_collidelist(_update) # <<<<<<<<<<<<<< @@ -16658,14 +17030,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v__update) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v__update); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1133, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; } - /* "pygame/_sprite.pyx":1102 + /* "pygame/_sprite.pyx":1104 * _old_rect = self.spritedict * _update = self.lostsprites * _update_append = _update.append # <<<<<<<<<<<<<< @@ -16674,17 +17046,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 1102, __pyx_L1_error) + __PYX_ERR(0, 1104, __pyx_L1_error) } - /* "pygame/_sprite.pyx":1134 + /* "pygame/_sprite.pyx":1136 * del _update[i] * i = _union_rect_collidelist(_update) * _update_append(_union_rect.clip(_clip)) # <<<<<<<<<<<<<< * * if _old_rect[spr] is not init_rect: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16698,13 +17070,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_v__clip) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v__clip); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v__update, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1134, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v__update, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1136 + /* "pygame/_sprite.pyx":1138 * _update_append(_union_rect.clip(_clip)) * * if _old_rect[spr] is not init_rect: # <<<<<<<<<<<<<< @@ -16713,16 +17085,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__old_rect == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1136, __pyx_L1_error) + __PYX_ERR(0, 1138, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v__old_rect, __pyx_v_spr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v__old_rect, __pyx_v_spr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (__pyx_t_3 != __pyx_v_init_rect); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":1137 + /* "pygame/_sprite.pyx":1139 * * if _old_rect[spr] is not init_rect: * _union_rect = _rect(_old_rect[spr]) # <<<<<<<<<<<<<< @@ -16731,41 +17103,41 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__old_rect == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1137, __pyx_L1_error) + __PYX_ERR(0, 1139, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v__old_rect, __pyx_v_spr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v__old_rect, __pyx_v_spr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v__rect), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v__rect), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v__union_rect, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1138 + /* "pygame/_sprite.pyx":1140 * if _old_rect[spr] is not init_rect: * _union_rect = _rect(_old_rect[spr]) * _union_rect_collidelist = _union_rect.collidelist # <<<<<<<<<<<<<< * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_collidelist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_collidelist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v__union_rect_collidelist, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1139 + /* "pygame/_sprite.pyx":1141 * _union_rect = _rect(_old_rect[spr]) * _union_rect_collidelist = _union_rect.collidelist * _union_rect_union_ip = _union_rect.union_ip # <<<<<<<<<<<<<< * i = _union_rect_collidelist(_update) * while -1 < i: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_union_ip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_union_ip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v__union_rect_union_ip, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1140 + /* "pygame/_sprite.pyx":1142 * _union_rect_collidelist = _union_rect.collidelist * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) # <<<<<<<<<<<<<< @@ -16785,13 +17157,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_v__update) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v__update); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1141 + /* "pygame/_sprite.pyx":1143 * _union_rect_union_ip = _union_rect.union_ip * i = _union_rect_collidelist(_update) * while -1 < i: # <<<<<<<<<<<<<< @@ -16799,12 +17171,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj * del _update[i] */ while (1) { - __pyx_t_2 = PyObject_RichCompare(__pyx_int_neg_1, __pyx_v_i, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_int_neg_1, __pyx_v_i, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_5) break; - /* "pygame/_sprite.pyx":1142 + /* "pygame/_sprite.pyx":1144 * i = _union_rect_collidelist(_update) * while -1 < i: * _union_rect_union_ip(_update[i]) # <<<<<<<<<<<<<< @@ -16813,9 +17185,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1142, __pyx_L1_error) + __PYX_ERR(0, 1144, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v__update, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1142, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v__update, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__union_rect_union_ip); __pyx_t_7 = __pyx_v__union_rect_union_ip; __pyx_t_8 = NULL; @@ -16831,12 +17203,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1142, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1143 + /* "pygame/_sprite.pyx":1145 * while -1 < i: * _union_rect_union_ip(_update[i]) * del _update[i] # <<<<<<<<<<<<<< @@ -16845,11 +17217,11 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1143, __pyx_L1_error) + __PYX_ERR(0, 1145, __pyx_L1_error) } - if (unlikely(PyObject_DelItem(__pyx_v__update, __pyx_v_i) < 0)) __PYX_ERR(0, 1143, __pyx_L1_error) + if (unlikely(PyObject_DelItem(__pyx_v__update, __pyx_v_i) < 0)) __PYX_ERR(0, 1145, __pyx_L1_error) - /* "pygame/_sprite.pyx":1144 + /* "pygame/_sprite.pyx":1146 * _union_rect_union_ip(_update[i]) * del _update[i] * i = _union_rect_collidelist(_update) # <<<<<<<<<<<<<< @@ -16869,14 +17241,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_v__update) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v__update); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1144, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; } - /* "pygame/_sprite.pyx":1102 + /* "pygame/_sprite.pyx":1104 * _old_rect = self.spritedict * _update = self.lostsprites * _update_append = _update.append # <<<<<<<<<<<<<< @@ -16885,17 +17257,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 1102, __pyx_L1_error) + __PYX_ERR(0, 1104, __pyx_L1_error) } - /* "pygame/_sprite.pyx":1145 + /* "pygame/_sprite.pyx":1147 * del _update[i] * i = _union_rect_collidelist(_update) * _update_append(_union_rect.clip(_clip)) # <<<<<<<<<<<<<< * # can it be done better? because that is an O(n**2) algorithm in * # worst case */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v__union_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -16909,13 +17281,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_v__clip) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v__clip); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1145, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v__update, __pyx_t_2); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v__update, __pyx_t_2); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1136 + /* "pygame/_sprite.pyx":1138 * _update_append(_union_rect.clip(_clip)) * * if _old_rect[spr] is not init_rect: # <<<<<<<<<<<<<< @@ -16924,7 +17296,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1119 + /* "pygame/_sprite.pyx":1121 * # still not happy with that part * for spr in _sprites: * if 0 < spr.dirty: # <<<<<<<<<<<<<< @@ -16933,7 +17305,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1118 + /* "pygame/_sprite.pyx":1120 * # 1. find dirty area on screen and put the rects into _update * # still not happy with that part * for spr in _sprites: # <<<<<<<<<<<<<< @@ -16943,7 +17315,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1150 + /* "pygame/_sprite.pyx":1152 * * # clear using background * if _bgd is not None: # <<<<<<<<<<<<<< @@ -16954,7 +17326,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1151 + /* "pygame/_sprite.pyx":1153 * # clear using background * if _bgd is not None: * for rec in _update: # <<<<<<<<<<<<<< @@ -16963,21 +17335,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1151, __pyx_L1_error) + __PYX_ERR(0, 1153, __pyx_L1_error) } __pyx_t_1 = __pyx_v__update; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1151, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1151, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_rec, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1152 + /* "pygame/_sprite.pyx":1154 * if _bgd is not None: * for rec in _update: * _surf_blit(_bgd, rec, rec) # <<<<<<<<<<<<<< @@ -17000,7 +17372,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v__bgd, __pyx_v_rec, __pyx_v_rec}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -17008,13 +17380,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v__bgd, __pyx_v_rec, __pyx_v_rec}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -17028,14 +17400,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __Pyx_INCREF(__pyx_v_rec); __Pyx_GIVEREF(__pyx_v_rec); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_10, __pyx_v_rec); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1151 + /* "pygame/_sprite.pyx":1153 * # clear using background * if _bgd is not None: * for rec in _update: # <<<<<<<<<<<<<< @@ -17045,7 +17417,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1150 + /* "pygame/_sprite.pyx":1152 * * # clear using background * if _bgd is not None: # <<<<<<<<<<<<<< @@ -17054,7 +17426,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1155 + /* "pygame/_sprite.pyx":1157 * * # 2. draw * for spr in _sprites: # <<<<<<<<<<<<<< @@ -17063,96 +17435,96 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1155, __pyx_L1_error) + __PYX_ERR(0, 1157, __pyx_L1_error) } __pyx_t_1 = __pyx_v__sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1157, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1155, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1156 + /* "pygame/_sprite.pyx":1158 * # 2. draw * for spr in _sprites: * if 1 > spr.dirty: # <<<<<<<<<<<<<< * if spr._visible: * # sprite not dirty; blit only the intersecting part */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_dirty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1156, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_dirty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyObject_RichCompare(__pyx_int_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1156, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_int_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1156, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1157 + /* "pygame/_sprite.pyx":1159 * for spr in _sprites: * if 1 > spr.dirty: * if spr._visible: # <<<<<<<<<<<<<< * # sprite not dirty; blit only the intersecting part * if spr.source_rect is not None: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_visible); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_visible); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1159 + /* "pygame/_sprite.pyx":1161 * if spr._visible: * # sprite not dirty; blit only the intersecting part * if spr.source_rect is not None: # <<<<<<<<<<<<<< * # For possible future speed up, source_rect's data * # can be prefetched outside of this loop. */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1159, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = (__pyx_t_7 != Py_None); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":1162 + /* "pygame/_sprite.pyx":1164 * # For possible future speed up, source_rect's data * # can be prefetched outside of this loop. * _spr_rect = _rect(spr.rect.topleft, # <<<<<<<<<<<<<< * spr.source_rect.size) * rect_offset_x = spr.source_rect[0] - _spr_rect[0] */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_topleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_topleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":1163 + /* "pygame/_sprite.pyx":1165 * # can be prefetched outside of this loop. * _spr_rect = _rect(spr.rect.topleft, * spr.source_rect.size) # <<<<<<<<<<<<<< * rect_offset_x = spr.source_rect[0] - _spr_rect[0] * rect_offset_y = spr.source_rect[1] - _spr_rect[1] */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1163, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1163, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":1162 + /* "pygame/_sprite.pyx":1164 * # For possible future speed up, source_rect's data * # can be prefetched outside of this loop. * _spr_rect = _rect(spr.rect.topleft, # <<<<<<<<<<<<<< * spr.source_rect.size) * rect_offset_x = spr.source_rect[0] - _spr_rect[0] */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); @@ -17160,55 +17532,55 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8); __pyx_t_2 = 0; __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_v__rect), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)__pyx_v__rect), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v__spr_rect, __pyx_t_8); __pyx_t_8 = 0; - /* "pygame/_sprite.pyx":1164 + /* "pygame/_sprite.pyx":1166 * _spr_rect = _rect(spr.rect.topleft, * spr.source_rect.size) * rect_offset_x = spr.source_rect[0] - _spr_rect[0] # <<<<<<<<<<<<<< * rect_offset_y = spr.source_rect[1] - _spr_rect[1] * else: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1164, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1164, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v__spr_rect, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1164, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v__spr_rect, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = PyNumber_Subtract(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_rect_offset_x, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1165 + /* "pygame/_sprite.pyx":1167 * spr.source_rect.size) * rect_offset_x = spr.source_rect[0] - _spr_rect[0] * rect_offset_y = spr.source_rect[1] - _spr_rect[1] # <<<<<<<<<<<<<< * else: * _spr_rect = spr.rect */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v__spr_rect, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v__spr_rect, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyNumber_Subtract(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_7 = PyNumber_Subtract(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_rect_offset_y, __pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":1159 + /* "pygame/_sprite.pyx":1161 * if spr._visible: * # sprite not dirty; blit only the intersecting part * if spr.source_rect is not None: # <<<<<<<<<<<<<< @@ -17218,7 +17590,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj goto __pyx_L22; } - /* "pygame/_sprite.pyx":1167 + /* "pygame/_sprite.pyx":1169 * rect_offset_y = spr.source_rect[1] - _spr_rect[1] * else: * _spr_rect = spr.rect # <<<<<<<<<<<<<< @@ -17226,36 +17598,36 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj * rect_offset_y = -_spr_rect[1] */ /*else*/ { - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1167, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v__spr_rect, __pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":1168 + /* "pygame/_sprite.pyx":1170 * else: * _spr_rect = spr.rect * rect_offset_x = -_spr_rect[0] # <<<<<<<<<<<<<< * rect_offset_y = -_spr_rect[1] * */ - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v__spr_rect, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v__spr_rect, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = PyNumber_Negative(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_2 = PyNumber_Negative(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_rect_offset_x, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1169 + /* "pygame/_sprite.pyx":1171 * _spr_rect = spr.rect * rect_offset_x = -_spr_rect[0] * rect_offset_y = -_spr_rect[1] # <<<<<<<<<<<<<< * * _spr_rect_clip = _spr_rect.clip */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v__spr_rect, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1169, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v__spr_rect, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L1_error) + __pyx_t_7 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_rect_offset_y, __pyx_t_7); @@ -17263,26 +17635,26 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_L22:; - /* "pygame/_sprite.pyx":1171 + /* "pygame/_sprite.pyx":1173 * rect_offset_y = -_spr_rect[1] * * _spr_rect_clip = _spr_rect.clip # <<<<<<<<<<<<<< * * for idx in _spr_rect.collidelistall(_update): */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v__spr_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1171, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v__spr_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v__spr_rect_clip, __pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":1173 + /* "pygame/_sprite.pyx":1175 * _spr_rect_clip = _spr_rect.clip * * for idx in _spr_rect.collidelistall(_update): # <<<<<<<<<<<<<< * # clip * clip = _spr_rect_clip(_update[idx]) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__spr_rect, __pyx_n_s_collidelistall); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__spr_rect, __pyx_n_s_collidelistall); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -17296,16 +17668,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_v__update) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v__update); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1173, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1175, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -17313,17 +17685,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_7); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_7); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1175, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_7); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_7); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1175, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -17333,7 +17705,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1173, __pyx_L1_error) + else __PYX_ERR(0, 1175, __pyx_L1_error) } break; } @@ -17342,7 +17714,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":1175 + /* "pygame/_sprite.pyx":1177 * for idx in _spr_rect.collidelistall(_update): * # clip * clip = _spr_rect_clip(_update[idx]) # <<<<<<<<<<<<<< @@ -17351,9 +17723,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1175, __pyx_L1_error) + __PYX_ERR(0, 1177, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v__update, __pyx_v_idx); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v__update, __pyx_v_idx); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v__spr_rect_clip); __pyx_t_3 = __pyx_v__spr_rect_clip; __pyx_t_13 = NULL; @@ -17369,76 +17741,76 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_7 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_13, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1175, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_clip, __pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":1176 + /* "pygame/_sprite.pyx":1178 * # clip * clip = _spr_rect_clip(_update[idx]) * _surf_blit(spr.image, # <<<<<<<<<<<<<< * clip, * (clip[0] + rect_offset_x, */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "pygame/_sprite.pyx":1178 + /* "pygame/_sprite.pyx":1180 * _surf_blit(spr.image, * clip, * (clip[0] + rect_offset_x, # <<<<<<<<<<<<<< * clip[1] + rect_offset_y, * clip[2], */ - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_clip, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_clip, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_13 = PyNumber_Add(__pyx_t_8, __pyx_v_rect_offset_x); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_13 = PyNumber_Add(__pyx_t_8, __pyx_v_rect_offset_x); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "pygame/_sprite.pyx":1179 + /* "pygame/_sprite.pyx":1181 * clip, * (clip[0] + rect_offset_x, * clip[1] + rect_offset_y, # <<<<<<<<<<<<<< * clip[2], * clip[3]), */ - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_clip, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1179, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_clip, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_14 = PyNumber_Add(__pyx_t_8, __pyx_v_rect_offset_y); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1179, __pyx_L1_error) + __pyx_t_14 = PyNumber_Add(__pyx_t_8, __pyx_v_rect_offset_y); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "pygame/_sprite.pyx":1180 + /* "pygame/_sprite.pyx":1182 * (clip[0] + rect_offset_x, * clip[1] + rect_offset_y, * clip[2], # <<<<<<<<<<<<<< * clip[3]), * spr.blendmode) */ - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_clip, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1180, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_clip, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - /* "pygame/_sprite.pyx":1181 + /* "pygame/_sprite.pyx":1183 * clip[1] + rect_offset_y, * clip[2], * clip[3]), # <<<<<<<<<<<<<< * spr.blendmode) * else: # dirty sprite */ - __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_clip, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_clip, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - /* "pygame/_sprite.pyx":1178 + /* "pygame/_sprite.pyx":1180 * _surf_blit(spr.image, * clip, * (clip[0] + rect_offset_x, # <<<<<<<<<<<<<< * clip[1] + rect_offset_y, * clip[2], */ - __pyx_t_16 = PyTuple_New(4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_16 = PyTuple_New(4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_13); @@ -17453,14 +17825,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_8 = 0; __pyx_t_15 = 0; - /* "pygame/_sprite.pyx":1182 + /* "pygame/_sprite.pyx":1184 * clip[2], * clip[3]), * spr.blendmode) # <<<<<<<<<<<<<< * else: # dirty sprite * if spr._visible: */ - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_blendmode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_blendmode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_v__surf_blit); __pyx_t_8 = __pyx_v__surf_blit; __pyx_t_14 = NULL; @@ -17478,7 +17850,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_14, __pyx_t_3, __pyx_v_clip, __pyx_t_16, __pyx_t_15}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -17489,7 +17861,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_14, __pyx_t_3, __pyx_v_clip, __pyx_t_16, __pyx_t_15}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -17498,7 +17870,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } else #endif { - __pyx_t_13 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __pyx_t_14 = NULL; @@ -17515,14 +17887,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_3 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":1173 + /* "pygame/_sprite.pyx":1175 * _spr_rect_clip = _spr_rect.clip * * for idx in _spr_rect.collidelistall(_update): # <<<<<<<<<<<<<< @@ -17532,7 +17904,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1157 + /* "pygame/_sprite.pyx":1159 * for spr in _sprites: * if 1 > spr.dirty: * if spr._visible: # <<<<<<<<<<<<<< @@ -17541,7 +17913,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1156 + /* "pygame/_sprite.pyx":1158 * # 2. draw * for spr in _sprites: * if 1 > spr.dirty: # <<<<<<<<<<<<<< @@ -17551,7 +17923,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj goto __pyx_L20; } - /* "pygame/_sprite.pyx":1184 + /* "pygame/_sprite.pyx":1186 * spr.blendmode) * else: # dirty sprite * if spr._visible: # <<<<<<<<<<<<<< @@ -17559,50 +17931,50 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj * spr.rect, */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_visible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1184, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "pygame/_sprite.pyx":1185 + /* "pygame/_sprite.pyx":1187 * else: # dirty sprite * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, # <<<<<<<<<<<<<< * spr.rect, * spr.source_rect, */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - /* "pygame/_sprite.pyx":1186 + /* "pygame/_sprite.pyx":1188 * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, # <<<<<<<<<<<<<< * spr.source_rect, * spr.blendmode) */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - /* "pygame/_sprite.pyx":1187 + /* "pygame/_sprite.pyx":1189 * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, * spr.source_rect, # <<<<<<<<<<<<<< * spr.blendmode) * if spr.dirty == 1: */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - /* "pygame/_sprite.pyx":1188 + /* "pygame/_sprite.pyx":1190 * spr.rect, * spr.source_rect, * spr.blendmode) # <<<<<<<<<<<<<< * if spr.dirty == 1: * spr.dirty = 0 */ - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_blendmode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_blendmode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_v__surf_blit); __pyx_t_16 = __pyx_v__surf_blit; __pyx_t_3 = NULL; @@ -17620,7 +17992,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_16)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_7, __pyx_t_8, __pyx_t_13, __pyx_t_15}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -17632,7 +18004,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_t_7, __pyx_t_8, __pyx_t_13, __pyx_t_15}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -17642,7 +18014,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } else #endif { - __pyx_t_14 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -17659,13 +18031,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_8 = 0; __pyx_t_13 = 0; __pyx_t_15 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - /* "pygame/_sprite.pyx":1185 + /* "pygame/_sprite.pyx":1187 * else: # dirty sprite * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, # <<<<<<<<<<<<<< @@ -17674,12 +18046,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__old_rect == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1185, __pyx_L1_error) + __PYX_ERR(0, 1187, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v__old_rect, __pyx_v_spr, __pyx_t_2) < 0)) __PYX_ERR(0, 1185, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v__old_rect, __pyx_v_spr, __pyx_t_2) < 0)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1184 + /* "pygame/_sprite.pyx":1186 * spr.blendmode) * else: # dirty sprite * if spr._visible: # <<<<<<<<<<<<<< @@ -17688,32 +18060,32 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1189 + /* "pygame/_sprite.pyx":1191 * spr.source_rect, * spr.blendmode) * if spr.dirty == 1: # <<<<<<<<<<<<<< * spr.dirty = 0 * _ret = list(_update) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_dirty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_dirty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_16 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_5) { - /* "pygame/_sprite.pyx":1190 + /* "pygame/_sprite.pyx":1192 * spr.blendmode) * if spr.dirty == 1: * spr.dirty = 0 # <<<<<<<<<<<<<< * _ret = list(_update) * else: # flip, full screen mode */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_spr, __pyx_n_s_dirty, __pyx_int_0) < 0) __PYX_ERR(0, 1190, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_spr, __pyx_n_s_dirty, __pyx_int_0) < 0) __PYX_ERR(0, 1192, __pyx_L1_error) - /* "pygame/_sprite.pyx":1189 + /* "pygame/_sprite.pyx":1191 * spr.source_rect, * spr.blendmode) * if spr.dirty == 1: # <<<<<<<<<<<<<< @@ -17724,7 +18096,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_L20:; - /* "pygame/_sprite.pyx":1155 + /* "pygame/_sprite.pyx":1157 * * # 2. draw * for spr in _sprites: # <<<<<<<<<<<<<< @@ -17734,19 +18106,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1191 + /* "pygame/_sprite.pyx":1193 * if spr.dirty == 1: * spr.dirty = 0 * _ret = list(_update) # <<<<<<<<<<<<<< * else: # flip, full screen mode * if _bgd is not None: */ - __pyx_t_1 = PySequence_List(__pyx_v__update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_v__update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v__ret, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1115 + /* "pygame/_sprite.pyx":1117 * # 0. decide whether to render with update or flip * start_time = get_ticks() * if self._use_update: # dirty rects mode # <<<<<<<<<<<<<< @@ -17756,7 +18128,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj goto __pyx_L5; } - /* "pygame/_sprite.pyx":1193 + /* "pygame/_sprite.pyx":1195 * _ret = list(_update) * else: # flip, full screen mode * if _bgd is not None: # <<<<<<<<<<<<<< @@ -17768,7 +18140,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1194 + /* "pygame/_sprite.pyx":1196 * else: # flip, full screen mode * if _bgd is not None: * _surf_blit(_bgd, (0, 0)) # <<<<<<<<<<<<<< @@ -17791,7 +18163,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_16)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v__bgd, __pyx_tuple__11}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -17799,13 +18171,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v__bgd, __pyx_tuple__11}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_14 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -17816,14 +18188,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __Pyx_INCREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_10, __pyx_tuple__11); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1193 + /* "pygame/_sprite.pyx":1195 * _ret = list(_update) * else: # flip, full screen mode * if _bgd is not None: # <<<<<<<<<<<<<< @@ -17832,7 +18204,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1195 + /* "pygame/_sprite.pyx":1197 * if _bgd is not None: * _surf_blit(_bgd, (0, 0)) * for spr in _sprites: # <<<<<<<<<<<<<< @@ -17841,71 +18213,71 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__sprites == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1195, __pyx_L1_error) + __PYX_ERR(0, 1197, __pyx_L1_error) } __pyx_t_1 = __pyx_v__sprites; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_16); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_16 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_16); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1197, __pyx_L1_error) #else - __pyx_t_16 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_16 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); #endif __Pyx_XDECREF_SET(__pyx_v_spr, __pyx_t_16); __pyx_t_16 = 0; - /* "pygame/_sprite.pyx":1196 + /* "pygame/_sprite.pyx":1198 * _surf_blit(_bgd, (0, 0)) * for spr in _sprites: * if spr._visible: # <<<<<<<<<<<<<< * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, */ - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_visible); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_visible); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1197 + /* "pygame/_sprite.pyx":1199 * for spr in _sprites: * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, # <<<<<<<<<<<<<< * spr.rect, * spr.source_rect, */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_image); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - /* "pygame/_sprite.pyx":1198 + /* "pygame/_sprite.pyx":1200 * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, # <<<<<<<<<<<<<< * spr.source_rect, * spr.blendmode) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pygame/_sprite.pyx":1199 + /* "pygame/_sprite.pyx":1201 * _old_rect[spr] = _surf_blit(spr.image, * spr.rect, * spr.source_rect, # <<<<<<<<<<<<<< * spr.blendmode) * _ret = [_rect(_clip)] # return only the part of the screen changed */ - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_source_rect); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - /* "pygame/_sprite.pyx":1200 + /* "pygame/_sprite.pyx":1202 * spr.rect, * spr.source_rect, * spr.blendmode) # <<<<<<<<<<<<<< * _ret = [_rect(_clip)] # return only the part of the screen changed * */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_blendmode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1200, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_spr, __pyx_n_s_blendmode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v__surf_blit); __pyx_t_8 = __pyx_v__surf_blit; __pyx_t_7 = NULL; @@ -17923,7 +18295,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_14, __pyx_t_2, __pyx_t_15, __pyx_t_13}; - __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -17935,7 +18307,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_14, __pyx_t_2, __pyx_t_15, __pyx_t_13}; - __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -17945,7 +18317,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } else #endif { - __pyx_t_3 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -17962,13 +18334,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_t_2 = 0; __pyx_t_15 = 0; __pyx_t_13 = 0; - __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "pygame/_sprite.pyx":1197 + /* "pygame/_sprite.pyx":1199 * for spr in _sprites: * if spr._visible: * _old_rect[spr] = _surf_blit(spr.image, # <<<<<<<<<<<<<< @@ -17977,12 +18349,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ if (unlikely(__pyx_v__old_rect == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1197, __pyx_L1_error) + __PYX_ERR(0, 1199, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v__old_rect, __pyx_v_spr, __pyx_t_16) < 0)) __PYX_ERR(0, 1197, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v__old_rect, __pyx_v_spr, __pyx_t_16) < 0)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - /* "pygame/_sprite.pyx":1196 + /* "pygame/_sprite.pyx":1198 * _surf_blit(_bgd, (0, 0)) * for spr in _sprites: * if spr._visible: # <<<<<<<<<<<<<< @@ -17991,7 +18363,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1195 + /* "pygame/_sprite.pyx":1197 * if _bgd is not None: * _surf_blit(_bgd, (0, 0)) * for spr in _sprites: # <<<<<<<<<<<<<< @@ -18001,16 +18373,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1201 + /* "pygame/_sprite.pyx":1203 * spr.source_rect, * spr.blendmode) * _ret = [_rect(_clip)] # return only the part of the screen changed # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v__rect), __pyx_v__clip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v__rect), __pyx_v__clip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_16, 0, __pyx_t_1); @@ -18020,14 +18392,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_L5:; - /* "pygame/_sprite.pyx":1206 + /* "pygame/_sprite.pyx":1208 * # timing for switching modes * # How may a good threshold be found? It depends on the hardware. * end_time = get_ticks() # <<<<<<<<<<<<<< * if end_time-start_time > self._time_threshold: * self._use_update = False */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_ticks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1206, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_ticks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -18041,31 +18413,31 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_16 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1206, __pyx_L1_error) + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_end_time = __pyx_t_16; __pyx_t_16 = 0; - /* "pygame/_sprite.pyx":1207 + /* "pygame/_sprite.pyx":1209 * # How may a good threshold be found? It depends on the hardware. * end_time = get_ticks() * if end_time-start_time > self._time_threshold: # <<<<<<<<<<<<<< * self._use_update = False * else: */ - __pyx_t_16 = PyNumber_Subtract(__pyx_v_end_time, __pyx_v_start_time); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_t_16 = PyNumber_Subtract(__pyx_v_end_time, __pyx_v_start_time); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_time_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_time_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_16, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_16, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1209, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1209, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1208 + /* "pygame/_sprite.pyx":1210 * end_time = get_ticks() * if end_time-start_time > self._time_threshold: * self._use_update = False # <<<<<<<<<<<<<< @@ -18074,7 +18446,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj */ __pyx_v_self->_use_update = 0; - /* "pygame/_sprite.pyx":1207 + /* "pygame/_sprite.pyx":1209 * # How may a good threshold be found? It depends on the hardware. * end_time = get_ticks() * if end_time-start_time > self._time_threshold: # <<<<<<<<<<<<<< @@ -18084,7 +18456,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj goto __pyx_L31; } - /* "pygame/_sprite.pyx":1210 + /* "pygame/_sprite.pyx":1212 * self._use_update = False * else: * self._use_update = True # <<<<<<<<<<<<<< @@ -18096,30 +18468,30 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_L31:; - /* "pygame/_sprite.pyx":1216 + /* "pygame/_sprite.pyx":1218 * * # emtpy dirty rects list * _update[:] = [] # <<<<<<<<<<<<<< * * # ------- */ - __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1216, __pyx_L1_error) + __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (unlikely(__pyx_v__update == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1216, __pyx_L1_error) + __PYX_ERR(0, 1218, __pyx_L1_error) } - if (__Pyx_PyObject_SetSlice(__pyx_v__update, __pyx_t_8, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 1216, __pyx_L1_error) + if (__Pyx_PyObject_SetSlice(__pyx_v__update, __pyx_t_8, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "pygame/_sprite.pyx":1220 + /* "pygame/_sprite.pyx":1222 * # ------- * # restore original clip * _surf.set_clip(_orig_clip) # <<<<<<<<<<<<<< * return _ret * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__surf, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__surf, __pyx_n_s_set_clip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -18133,12 +18505,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj } __pyx_t_8 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_16, __pyx_v__orig_clip) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__orig_clip); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1220, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "pygame/_sprite.pyx":1221 + /* "pygame/_sprite.pyx":1223 * # restore original clip * _surf.set_clip(_orig_clip) * return _ret # <<<<<<<<<<<<<< @@ -18150,7 +18522,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj __pyx_r = __pyx_v__ret; goto __pyx_L0; - /* "pygame/_sprite.pyx":1083 + /* "pygame/_sprite.pyx":1085 * LayeredUpdates.add_internal(self, sprite, layer) * * def draw(self, surface, bgd=None): # <<<<<<<<<<<<<< @@ -18203,7 +18575,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_4draw(struct __pyx_obj return __pyx_r; } -/* "pygame/_sprite.pyx":1223 +/* "pygame/_sprite.pyx":1225 * return _ret * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< @@ -18217,6 +18589,9 @@ static char __pyx_doc_6pygame_7_sprite_12LayeredDirty_6clear[] = "use to set bac static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_7clear(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_surface = 0; PyObject *__pyx_v_bgd = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear (wrapper)", 0); @@ -18243,11 +18618,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_7clear(PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bgd)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, 1); __PYX_ERR(0, 1223, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, 1); __PYX_ERR(0, 1225, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clear") < 0)) __PYX_ERR(0, 1223, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clear") < 0)) __PYX_ERR(0, 1225, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -18260,7 +18635,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_7clear(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1223, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("clear", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1225, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -18278,7 +18653,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_6clear(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear", 0); - /* "pygame/_sprite.pyx":1229 + /* "pygame/_sprite.pyx":1231 * * """ * self._bgd = bgd # <<<<<<<<<<<<<< @@ -18291,7 +18666,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_6clear(struct __pyx_ob __Pyx_DECREF(__pyx_v_self->_bgd); __pyx_v_self->_bgd = __pyx_v_bgd; - /* "pygame/_sprite.pyx":1223 + /* "pygame/_sprite.pyx":1225 * return _ret * * def clear(self, surface, bgd): # <<<<<<<<<<<<<< @@ -18306,7 +18681,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_6clear(struct __pyx_ob return __pyx_r; } -/* "pygame/_sprite.pyx":1231 +/* "pygame/_sprite.pyx":1233 * self._bgd = bgd * * def repaint_rect(self, screen_rect): # <<<<<<<<<<<<<< @@ -18336,19 +18711,22 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_8repaint_rect(struct _ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("repaint_rect", 0); - /* "pygame/_sprite.pyx":1239 + /* "pygame/_sprite.pyx":1241 * * """ * if self._clip: # <<<<<<<<<<<<<< * self.lostsprites.append(screen_rect.clip(self._clip)) * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->_clip)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1239, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->_clip)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1241, __pyx_L1_error) if (__pyx_t_1) { - /* "pygame/_sprite.pyx":1240 + /* "pygame/_sprite.pyx":1242 * """ * if self._clip: * self.lostsprites.append(screen_rect.clip(self._clip)) # <<<<<<<<<<<<<< @@ -18357,9 +18735,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_8repaint_rect(struct _ */ if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.lostsprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 1240, __pyx_L1_error) + __PYX_ERR(0, 1242, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_screen_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_screen_rect, __pyx_n_s_clip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -18373,13 +18751,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_8repaint_rect(struct _ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_self->_clip)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self->_clip)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.__pyx_base.lostsprites, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.__pyx_base.lostsprites, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1239 + /* "pygame/_sprite.pyx":1241 * * """ * if self._clip: # <<<<<<<<<<<<<< @@ -18389,7 +18767,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_8repaint_rect(struct _ goto __pyx_L3; } - /* "pygame/_sprite.pyx":1242 + /* "pygame/_sprite.pyx":1244 * self.lostsprites.append(screen_rect.clip(self._clip)) * else: * self.lostsprites.append(Rect(screen_rect)) # <<<<<<<<<<<<<< @@ -18399,16 +18777,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_8repaint_rect(struct _ /*else*/ { if (unlikely(__pyx_v_self->__pyx_base.__pyx_base.lostsprites == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 1242, __pyx_L1_error) + __PYX_ERR(0, 1244, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect), __pyx_v_screen_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect), __pyx_v_screen_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.__pyx_base.lostsprites, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1242, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.__pyx_base.lostsprites, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; - /* "pygame/_sprite.pyx":1231 + /* "pygame/_sprite.pyx":1233 * self._bgd = bgd * * def repaint_rect(self, screen_rect): # <<<<<<<<<<<<<< @@ -18431,7 +18809,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_8repaint_rect(struct _ return __pyx_r; } -/* "pygame/_sprite.pyx":1244 +/* "pygame/_sprite.pyx":1246 * self.lostsprites.append(Rect(screen_rect)) * * def set_clip(self, screen_rect=None): # <<<<<<<<<<<<<< @@ -18444,6 +18822,9 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_11set_clip(PyObject *_ static char __pyx_doc_6pygame_7_sprite_12LayeredDirty_10set_clip[] = "clip the area where to draw; pass None (default) to reset the clip\n\n LayeredDirty.set_clip(screen_rect=None): return None\n\n "; static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_11set_clip(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_screen_rect = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_clip (wrapper)", 0); @@ -18469,7 +18850,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_11set_clip(PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_clip") < 0)) __PYX_ERR(0, 1244, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_clip") < 0)) __PYX_ERR(0, 1246, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -18483,7 +18864,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_11set_clip(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_clip", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1244, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_clip", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1246, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty.set_clip", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -18505,9 +18886,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __py PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_clip", 0); - /* "pygame/_sprite.pyx":1250 + /* "pygame/_sprite.pyx":1252 * * """ * if screen_rect is None: # <<<<<<<<<<<<<< @@ -18518,19 +18902,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __py __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "pygame/_sprite.pyx":1251 + /* "pygame/_sprite.pyx":1253 * """ * if screen_rect is None: * self._clip = pygame.display.get_surface().get_rect() # <<<<<<<<<<<<<< * else: * self._clip = screen_rect */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pygame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1251, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pygame); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_display); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_display); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get_surface); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get_surface); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -18545,10 +18929,10 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __py } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_rect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_rect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -18563,17 +18947,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __py } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1251, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_clip); __Pyx_DECREF(((PyObject *)__pyx_v_self->_clip)); __pyx_v_self->_clip = ((pgRectObject *)__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1250 + /* "pygame/_sprite.pyx":1252 * * """ * if screen_rect is None: # <<<<<<<<<<<<<< @@ -18583,7 +18967,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __py goto __pyx_L3; } - /* "pygame/_sprite.pyx":1253 + /* "pygame/_sprite.pyx":1255 * self._clip = pygame.display.get_surface().get_rect() * else: * self._clip = screen_rect # <<<<<<<<<<<<<< @@ -18591,7 +18975,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __py * */ /*else*/ { - if (!(likely(((__pyx_v_screen_rect) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_screen_rect, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1253, __pyx_L1_error) + if (!(likely(((__pyx_v_screen_rect) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_screen_rect, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1255, __pyx_L1_error) __pyx_t_3 = __pyx_v_screen_rect; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -18602,7 +18986,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __py } __pyx_L3:; - /* "pygame/_sprite.pyx":1254 + /* "pygame/_sprite.pyx":1256 * else: * self._clip = screen_rect * self._use_update = False # <<<<<<<<<<<<<< @@ -18611,7 +18995,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __py */ __pyx_v_self->_use_update = 0; - /* "pygame/_sprite.pyx":1244 + /* "pygame/_sprite.pyx":1246 * self.lostsprites.append(Rect(screen_rect)) * * def set_clip(self, screen_rect=None): # <<<<<<<<<<<<<< @@ -18635,7 +19019,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_10set_clip(struct __py return __pyx_r; } -/* "pygame/_sprite.pyx":1256 +/* "pygame/_sprite.pyx":1258 * self._use_update = False * * def get_clip(self): # <<<<<<<<<<<<<< @@ -18662,7 +19046,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_12get_clip(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_clip", 0); - /* "pygame/_sprite.pyx":1262 + /* "pygame/_sprite.pyx":1264 * * """ * return self._clip # <<<<<<<<<<<<<< @@ -18674,7 +19058,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_12get_clip(struct __py __pyx_r = ((PyObject *)__pyx_v_self->_clip); goto __pyx_L0; - /* "pygame/_sprite.pyx":1256 + /* "pygame/_sprite.pyx":1258 * self._use_update = False * * def get_clip(self): # <<<<<<<<<<<<<< @@ -18689,7 +19073,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_12get_clip(struct __py return __pyx_r; } -/* "pygame/_sprite.pyx":1264 +/* "pygame/_sprite.pyx":1266 * return self._clip * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< @@ -18703,6 +19087,9 @@ static char __pyx_doc_6pygame_7_sprite_12LayeredDirty_14change_layer[] = "change static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_15change_layer(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_new_layer = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("change_layer (wrapper)", 0); @@ -18729,11 +19116,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_15change_layer(PyObjec case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_layer)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, 1); __PYX_ERR(0, 1264, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, 1); __PYX_ERR(0, 1266, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "change_layer") < 0)) __PYX_ERR(0, 1264, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "change_layer") < 0)) __PYX_ERR(0, 1266, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -18746,7 +19133,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_12LayeredDirty_15change_layer(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1264, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("change_layer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1266, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.LayeredDirty.change_layer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -18768,16 +19155,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_14change_layer(struct int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("change_layer", 0); - /* "pygame/_sprite.pyx":1273 + /* "pygame/_sprite.pyx":1275 * * """ * LayeredUpdates.change_layer(self, sprite, new_layer) # <<<<<<<<<<<<<< * if sprite.dirty == 0: * sprite.dirty = 1 */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates), __pyx_n_s_change_layer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -18794,7 +19184,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_14change_layer(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_sprite, __pyx_v_new_layer}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -18802,13 +19192,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_14change_layer(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_sprite, __pyx_v_new_layer}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1273, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -18822,39 +19212,39 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_14change_layer(struct __Pyx_INCREF(__pyx_v_new_layer); __Pyx_GIVEREF(__pyx_v_new_layer); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_new_layer); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1274 + /* "pygame/_sprite.pyx":1276 * """ * LayeredUpdates.change_layer(self, sprite, new_layer) * if sprite.dirty == 0: # <<<<<<<<<<<<<< * sprite.dirty = 1 * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "pygame/_sprite.pyx":1275 + /* "pygame/_sprite.pyx":1277 * LayeredUpdates.change_layer(self, sprite, new_layer) * if sprite.dirty == 0: * sprite.dirty = 1 # <<<<<<<<<<<<<< * * def set_timing_treshold(self, time_ms): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 1275, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_sprite, __pyx_n_s_dirty, __pyx_int_1) < 0) __PYX_ERR(0, 1277, __pyx_L1_error) - /* "pygame/_sprite.pyx":1274 + /* "pygame/_sprite.pyx":1276 * """ * LayeredUpdates.change_layer(self, sprite, new_layer) * if sprite.dirty == 0: # <<<<<<<<<<<<<< @@ -18863,7 +19253,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_14change_layer(struct */ } - /* "pygame/_sprite.pyx":1264 + /* "pygame/_sprite.pyx":1266 * return self._clip * * def change_layer(self, sprite, new_layer): # <<<<<<<<<<<<<< @@ -18887,7 +19277,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_14change_layer(struct return __pyx_r; } -/* "pygame/_sprite.pyx":1277 +/* "pygame/_sprite.pyx":1279 * sprite.dirty = 1 * * def set_timing_treshold(self, time_ms): # <<<<<<<<<<<<<< @@ -18913,19 +19303,22 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_16set_timing_treshold( PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations float __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_timing_treshold", 0); - /* "pygame/_sprite.pyx":1288 + /* "pygame/_sprite.pyx":1290 * * """ * self._time_threshold = time_ms # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_time_ms); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_time_ms); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1290, __pyx_L1_error) __pyx_v_self->_time_threshold = __pyx_t_1; - /* "pygame/_sprite.pyx":1277 + /* "pygame/_sprite.pyx":1279 * sprite.dirty = 1 * * def set_timing_treshold(self, time_ms): # <<<<<<<<<<<<<< @@ -18945,7 +19338,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_16set_timing_treshold( return __pyx_r; } -/* "pygame/_sprite.pyx":1029 +/* "pygame/_sprite.pyx":1031 * """ * * cdef public Rect _clip # <<<<<<<<<<<<<< @@ -18999,8 +19392,11 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip_2__set__(struct __pyx int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1029, __pyx_L1_error) + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pygame_5_sdl2_5video_Rect))))) __PYX_ERR(0, 1031, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -19050,7 +19446,7 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_5_clip_4__del__(struct __pyx return __pyx_r; } -/* "pygame/_sprite.pyx":1030 +/* "pygame/_sprite.pyx":1032 * * cdef public Rect _clip * cdef public bint _use_update # <<<<<<<<<<<<<< @@ -19075,9 +19471,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_11_use_update___get__( PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_use_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->_use_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -19111,8 +19510,11 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_11_use_update_2__set__(struc int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1032, __pyx_L1_error) __pyx_v_self->_use_update = __pyx_t_1; /* function exit code */ @@ -19126,7 +19528,7 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_11_use_update_2__set__(struc return __pyx_r; } -/* "pygame/_sprite.pyx":1031 +/* "pygame/_sprite.pyx":1033 * cdef public Rect _clip * cdef public bint _use_update * cdef public float _time_threshold # <<<<<<<<<<<<<< @@ -19151,9 +19553,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_15_time_threshold___ge PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_time_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_time_threshold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -19187,8 +19592,11 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_15_time_threshold_2__set__(s int __pyx_r; __Pyx_RefNannyDeclarations float __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1033, __pyx_L1_error) __pyx_v_self->_time_threshold = __pyx_t_1; /* function exit code */ @@ -19202,7 +19610,7 @@ static int __pyx_pf_6pygame_7_sprite_12LayeredDirty_15_time_threshold_2__set__(s return __pyx_r; } -/* "pygame/_sprite.pyx":1032 +/* "pygame/_sprite.pyx":1034 * cdef public bint _use_update * cdef public float _time_threshold * cdef public object _bgd # <<<<<<<<<<<<<< @@ -19320,6 +19728,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_18__reduce_cython__(CY PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -19374,6 +19785,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_20__setstate_cython__( PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -19404,7 +19818,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_20__setstate_cython__( return __pyx_r; } -/* "pygame/_sprite.pyx":1305 +/* "pygame/_sprite.pyx":1307 * cdef public object __sprite * * def __init__(self, sprite=None): # <<<<<<<<<<<<<< @@ -19416,6 +19830,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_12LayeredDirty_20__setstate_cython__( static int __pyx_pw_6pygame_7_sprite_11GroupSingle_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sprite = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -19441,7 +19858,7 @@ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_1__init__(PyObject *__pyx_v_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1305, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1307, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -19455,7 +19872,7 @@ static int __pyx_pw_6pygame_7_sprite_11GroupSingle_1__init__(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1305, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1307, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.GroupSingle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -19476,16 +19893,19 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle___init__(struct __pyx_obj_6py PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sprite.pyx":1306 + /* "pygame/_sprite.pyx":1308 * * def __init__(self, sprite=None): * AbstractGroup.__init__(self) # <<<<<<<<<<<<<< * self.__sprite = None * if sprite is not None: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1306, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -19499,12 +19919,12 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle___init__(struct __pyx_obj_6py } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1307 + /* "pygame/_sprite.pyx":1309 * def __init__(self, sprite=None): * AbstractGroup.__init__(self) * self.__sprite = None # <<<<<<<<<<<<<< @@ -19517,7 +19937,7 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle___init__(struct __pyx_obj_6py __Pyx_DECREF(__pyx_v_self->__sprite); __pyx_v_self->__sprite = Py_None; - /* "pygame/_sprite.pyx":1308 + /* "pygame/_sprite.pyx":1310 * AbstractGroup.__init__(self) * self.__sprite = None * if sprite is not None: # <<<<<<<<<<<<<< @@ -19528,14 +19948,14 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle___init__(struct __pyx_obj_6py __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":1309 + /* "pygame/_sprite.pyx":1311 * self.__sprite = None * if sprite is not None: * self.add(sprite) # <<<<<<<<<<<<<< * * def copy(self): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -19549,12 +19969,12 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle___init__(struct __pyx_obj_6py } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1308 + /* "pygame/_sprite.pyx":1310 * AbstractGroup.__init__(self) * self.__sprite = None * if sprite is not None: # <<<<<<<<<<<<<< @@ -19563,7 +19983,7 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle___init__(struct __pyx_obj_6py */ } - /* "pygame/_sprite.pyx":1305 + /* "pygame/_sprite.pyx":1307 * cdef public object __sprite * * def __init__(self, sprite=None): # <<<<<<<<<<<<<< @@ -19585,7 +20005,7 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle___init__(struct __pyx_obj_6py return __pyx_r; } -/* "pygame/_sprite.pyx":1311 +/* "pygame/_sprite.pyx":1313 * self.add(sprite) * * def copy(self): # <<<<<<<<<<<<<< @@ -19610,9 +20030,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_2copy(struct __pyx_obj_ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 0); - /* "pygame/_sprite.pyx":1312 + /* "pygame/_sprite.pyx":1314 * * def copy(self): * return GroupSingle(self.__sprite) # <<<<<<<<<<<<<< @@ -19620,13 +20043,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_2copy(struct __pyx_obj_ * cpdef list sprites(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle), __pyx_v_self->__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle), __pyx_v_self->__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":1311 + /* "pygame/_sprite.pyx":1313 * self.add(sprite) * * def copy(self): # <<<<<<<<<<<<<< @@ -19645,7 +20068,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_2copy(struct __pyx_obj_ return __pyx_r; } -/* "pygame/_sprite.pyx":1314 +/* "pygame/_sprite.pyx":1316 * return GroupSingle(self.__sprite) * * cpdef list sprites(self): # <<<<<<<<<<<<<< @@ -19663,6 +20086,9 @@ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -19673,7 +20099,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sprites); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_11GroupSingle_5sprites)) { __Pyx_XDECREF(__pyx_r); @@ -19690,10 +20116,10 @@ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1314, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1316, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -19712,7 +20138,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj #endif } - /* "pygame/_sprite.pyx":1315 + /* "pygame/_sprite.pyx":1317 * * cpdef list sprites(self): * if self.__sprite is not None: # <<<<<<<<<<<<<< @@ -19723,7 +20149,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "pygame/_sprite.pyx":1316 + /* "pygame/_sprite.pyx":1318 * cpdef list sprites(self): * if self.__sprite is not None: * return [self.__sprite] # <<<<<<<<<<<<<< @@ -19731,7 +20157,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj * return [] */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->__sprite); __Pyx_GIVEREF(__pyx_v_self->__sprite); @@ -19740,7 +20166,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":1315 + /* "pygame/_sprite.pyx":1317 * * cpdef list sprites(self): * if self.__sprite is not None: # <<<<<<<<<<<<<< @@ -19749,7 +20175,7 @@ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1318 + /* "pygame/_sprite.pyx":1320 * return [self.__sprite] * else: * return [] # <<<<<<<<<<<<<< @@ -19758,14 +20184,14 @@ static PyObject *__pyx_f_6pygame_7_sprite_11GroupSingle_sprites(struct __pyx_obj */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - /* "pygame/_sprite.pyx":1314 + /* "pygame/_sprite.pyx":1316 * return GroupSingle(self.__sprite) * * cpdef list sprites(self): # <<<<<<<<<<<<<< @@ -19804,9 +20230,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_4sprites(struct __pyx_o PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sprites", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6pygame_7_sprite_11GroupSingle_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6pygame_7_sprite_11GroupSingle_sprites(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -19823,7 +20252,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_4sprites(struct __pyx_o return __pyx_r; } -/* "pygame/_sprite.pyx":1320 +/* "pygame/_sprite.pyx":1322 * return [] * * cpdef void add_internal(self, sprite): # <<<<<<<<<<<<<< @@ -19840,6 +20269,9 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -19850,7 +20282,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_11GroupSingle_7add_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -19866,7 +20298,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1320, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -19886,7 +20318,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj #endif } - /* "pygame/_sprite.pyx":1321 + /* "pygame/_sprite.pyx":1323 * * cpdef void add_internal(self, sprite): * if self.__sprite is not None: # <<<<<<<<<<<<<< @@ -19897,14 +20329,14 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "pygame/_sprite.pyx":1322 + /* "pygame/_sprite.pyx":1324 * cpdef void add_internal(self, sprite): * if self.__sprite is not None: * self.__sprite.remove_internal(self) # <<<<<<<<<<<<<< * self.remove_internal(self.__sprite) * self.__sprite = sprite */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__sprite, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__sprite, __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -19918,12 +20350,12 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1323 + /* "pygame/_sprite.pyx":1325 * if self.__sprite is not None: * self.__sprite.remove_internal(self) * self.remove_internal(self.__sprite) # <<<<<<<<<<<<<< @@ -19935,7 +20367,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj ((struct __pyx_vtabstruct_6pygame_7_sprite_GroupSingle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.remove_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_t_1, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1321 + /* "pygame/_sprite.pyx":1323 * * cpdef void add_internal(self, sprite): * if self.__sprite is not None: # <<<<<<<<<<<<<< @@ -19944,7 +20376,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj */ } - /* "pygame/_sprite.pyx":1324 + /* "pygame/_sprite.pyx":1326 * self.__sprite.remove_internal(self) * self.remove_internal(self.__sprite) * self.__sprite = sprite # <<<<<<<<<<<<<< @@ -19957,7 +20389,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->__sprite); __pyx_v_self->__sprite = __pyx_v_sprite; - /* "pygame/_sprite.pyx":1320 + /* "pygame/_sprite.pyx":1322 * return [] * * cpdef void add_internal(self, sprite): # <<<<<<<<<<<<<< @@ -19994,9 +20426,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_6add_internal(struct __ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_11GroupSingle_add_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20013,7 +20448,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_6add_internal(struct __ return __pyx_r; } -/* "pygame/_sprite.pyx":1326 +/* "pygame/_sprite.pyx":1328 * self.__sprite = sprite * * def __nonzero__(self): # <<<<<<<<<<<<<< @@ -20040,7 +20475,7 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle_8__nonzero__(struct __pyx_obj int __pyx_t_1; __Pyx_RefNannySetupContext("__nonzero__", 0); - /* "pygame/_sprite.pyx":1327 + /* "pygame/_sprite.pyx":1329 * * def __nonzero__(self): * return self.__sprite is not None # <<<<<<<<<<<<<< @@ -20051,7 +20486,7 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle_8__nonzero__(struct __pyx_obj __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "pygame/_sprite.pyx":1326 + /* "pygame/_sprite.pyx":1328 * self.__sprite = sprite * * def __nonzero__(self): # <<<<<<<<<<<<<< @@ -20065,7 +20500,7 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle_8__nonzero__(struct __pyx_obj return __pyx_r; } -/* "pygame/_sprite.pyx":1329 +/* "pygame/_sprite.pyx":1331 * return self.__sprite is not None * * def _get_sprite(self): # <<<<<<<<<<<<<< @@ -20091,7 +20526,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_10_get_sprite(struct __ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_sprite", 0); - /* "pygame/_sprite.pyx":1330 + /* "pygame/_sprite.pyx":1332 * * def _get_sprite(self): * return self.__sprite # <<<<<<<<<<<<<< @@ -20103,7 +20538,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_10_get_sprite(struct __ __pyx_r = __pyx_v_self->__sprite; goto __pyx_L0; - /* "pygame/_sprite.pyx":1329 + /* "pygame/_sprite.pyx":1331 * return self.__sprite is not None * * def _get_sprite(self): # <<<<<<<<<<<<<< @@ -20118,7 +20553,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_10_get_sprite(struct __ return __pyx_r; } -/* "pygame/_sprite.pyx":1332 +/* "pygame/_sprite.pyx":1334 * return self.__sprite * * def _set_sprite(self, sprite): # <<<<<<<<<<<<<< @@ -20145,9 +20580,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_12_set_sprite(struct __ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_sprite", 0); - /* "pygame/_sprite.pyx":1333 + /* "pygame/_sprite.pyx":1335 * * def _set_sprite(self, sprite): * self.add_internal(sprite) # <<<<<<<<<<<<<< @@ -20156,14 +20594,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_12_set_sprite(struct __ */ ((struct __pyx_vtabstruct_6pygame_7_sprite_GroupSingle *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.add_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 0); - /* "pygame/_sprite.pyx":1334 + /* "pygame/_sprite.pyx":1336 * def _set_sprite(self, sprite): * self.add_internal(sprite) * sprite.add_internal(self) # <<<<<<<<<<<<<< * return sprite * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_add_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -20177,12 +20615,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_12_set_sprite(struct __ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1335 + /* "pygame/_sprite.pyx":1337 * self.add_internal(sprite) * sprite.add_internal(self) * return sprite # <<<<<<<<<<<<<< @@ -20194,7 +20632,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_12_set_sprite(struct __ __pyx_r = __pyx_v_sprite; goto __pyx_L0; - /* "pygame/_sprite.pyx":1332 + /* "pygame/_sprite.pyx":1334 * return self.__sprite * * def _set_sprite(self, sprite): # <<<<<<<<<<<<<< @@ -20215,7 +20653,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_12_set_sprite(struct __ return __pyx_r; } -/* "pygame/_sprite.pyx":1342 +/* "pygame/_sprite.pyx":1344 * "The sprite contained in this group") * * cpdef void remove_internal(self, sprite): # <<<<<<<<<<<<<< @@ -20232,6 +20670,9 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_ PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -20242,7 +20683,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_11GroupSingle_15remove_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -20258,7 +20699,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -20278,7 +20719,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_ #endif } - /* "pygame/_sprite.pyx":1343 + /* "pygame/_sprite.pyx":1345 * * cpdef void remove_internal(self, sprite): * if sprite is self.__sprite: # <<<<<<<<<<<<<< @@ -20289,7 +20730,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_ __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "pygame/_sprite.pyx":1344 + /* "pygame/_sprite.pyx":1346 * cpdef void remove_internal(self, sprite): * if sprite is self.__sprite: * self.__sprite = None # <<<<<<<<<<<<<< @@ -20302,7 +20743,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_ __Pyx_DECREF(__pyx_v_self->__sprite); __pyx_v_self->__sprite = Py_None; - /* "pygame/_sprite.pyx":1343 + /* "pygame/_sprite.pyx":1345 * * cpdef void remove_internal(self, sprite): * if sprite is self.__sprite: # <<<<<<<<<<<<<< @@ -20311,7 +20752,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_ */ } - /* "pygame/_sprite.pyx":1345 + /* "pygame/_sprite.pyx":1347 * if sprite is self.__sprite: * self.__sprite = None * if sprite in self.spritedict: # <<<<<<<<<<<<<< @@ -20320,13 +20761,13 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_ */ if (unlikely(__pyx_v_self->__pyx_base.spritedict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1345, __pyx_L1_error) + __PYX_ERR(0, 1347, __pyx_L1_error) } - __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_v_sprite, __pyx_v_self->__pyx_base.spritedict, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1345, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_v_sprite, __pyx_v_self->__pyx_base.spritedict, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1347, __pyx_L1_error) __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":1346 + /* "pygame/_sprite.pyx":1348 * self.__sprite = None * if sprite in self.spritedict: * AbstractGroup.remove_internal(self, sprite) # <<<<<<<<<<<<<< @@ -20335,7 +20776,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_ */ __pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal(((struct __pyx_obj_6pygame_7_sprite_AbstractGroup *)__pyx_v_self), __pyx_v_sprite, 1); - /* "pygame/_sprite.pyx":1345 + /* "pygame/_sprite.pyx":1347 * if sprite is self.__sprite: * self.__sprite = None * if sprite in self.spritedict: # <<<<<<<<<<<<<< @@ -20344,7 +20785,7 @@ static void __pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(struct __pyx_ */ } - /* "pygame/_sprite.pyx":1342 + /* "pygame/_sprite.pyx":1344 * "The sprite contained in this group") * * cpdef void remove_internal(self, sprite): # <<<<<<<<<<<<<< @@ -20381,9 +20822,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_14remove_internal(struc PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(__pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20400,7 +20844,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_14remove_internal(struc return __pyx_r; } -/* "pygame/_sprite.pyx":1348 +/* "pygame/_sprite.pyx":1350 * AbstractGroup.remove_internal(self, sprite) * * cpdef bint has_internal(self, sprite): # <<<<<<<<<<<<<< @@ -20417,6 +20861,9 @@ static int __pyx_f_6pygame_7_sprite_11GroupSingle_has_internal(struct __pyx_obj_ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_internal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; @@ -20427,7 +20874,7 @@ static int __pyx_f_6pygame_7_sprite_11GroupSingle_has_internal(struct __pyx_obj_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_has_internal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6pygame_7_sprite_11GroupSingle_17has_internal)) { __Pyx_INCREF(__pyx_t_1); @@ -20443,10 +20890,10 @@ static int __pyx_f_6pygame_7_sprite_11GroupSingle_has_internal(struct __pyx_obj_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sprite) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sprite); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1348, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -20465,7 +20912,7 @@ static int __pyx_f_6pygame_7_sprite_11GroupSingle_has_internal(struct __pyx_obj_ #endif } - /* "pygame/_sprite.pyx":1349 + /* "pygame/_sprite.pyx":1351 * * cpdef bint has_internal(self, sprite): * return self.__sprite is sprite # <<<<<<<<<<<<<< @@ -20476,7 +20923,7 @@ static int __pyx_f_6pygame_7_sprite_11GroupSingle_has_internal(struct __pyx_obj_ __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "pygame/_sprite.pyx":1348 + /* "pygame/_sprite.pyx":1350 * AbstractGroup.remove_internal(self, sprite) * * cpdef bint has_internal(self, sprite): # <<<<<<<<<<<<<< @@ -20514,9 +20961,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_16has_internal(struct _ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_internal", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6pygame_7_sprite_11GroupSingle_has_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6pygame_7_sprite_11GroupSingle_has_internal(__pyx_v_self, __pyx_v_sprite, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20533,7 +20983,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_16has_internal(struct _ return __pyx_r; } -/* "pygame/_sprite.pyx":1352 +/* "pygame/_sprite.pyx":1354 * * # Optimizations... * def __contains__(self, sprite): # <<<<<<<<<<<<<< @@ -20560,7 +21010,7 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle_18__contains__(struct __pyx_o int __pyx_t_1; __Pyx_RefNannySetupContext("__contains__", 0); - /* "pygame/_sprite.pyx":1353 + /* "pygame/_sprite.pyx":1355 * # Optimizations... * def __contains__(self, sprite): * return self.__sprite is sprite # <<<<<<<<<<<<<< @@ -20571,7 +21021,7 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle_18__contains__(struct __pyx_o __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "pygame/_sprite.pyx":1352 + /* "pygame/_sprite.pyx":1354 * * # Optimizations... * def __contains__(self, sprite): # <<<<<<<<<<<<<< @@ -20585,7 +21035,7 @@ static int __pyx_pf_6pygame_7_sprite_11GroupSingle_18__contains__(struct __pyx_o return __pyx_r; } -/* "pygame/_sprite.pyx":1303 +/* "pygame/_sprite.pyx":1305 * """ * * cdef public object __sprite # <<<<<<<<<<<<<< @@ -20703,6 +21153,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_20__reduce_cython__(CYT PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -20757,6 +21210,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_22__setstate_cython__(C PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -20787,7 +21243,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_11GroupSingle_22__setstate_cython__(C return __pyx_r; } -/* "pygame/_sprite.pyx":1357 +/* "pygame/_sprite.pyx":1359 * * # Some different collision detection functions that could be used. * def collide_rect(left, right): # <<<<<<<<<<<<<< @@ -20802,6 +21258,9 @@ static PyMethodDef __pyx_mdef_6pygame_7_sprite_1collide_rect = {"collide_rect", static PyObject *__pyx_pw_6pygame_7_sprite_1collide_rect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_left = 0; PyObject *__pyx_v_right = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("collide_rect (wrapper)", 0); @@ -20828,11 +21287,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_1collide_rect(PyObject *__pyx_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("collide_rect", 1, 2, 2, 1); __PYX_ERR(0, 1357, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("collide_rect", 1, 2, 2, 1); __PYX_ERR(0, 1359, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "collide_rect") < 0)) __PYX_ERR(0, 1357, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "collide_rect") < 0)) __PYX_ERR(0, 1359, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -20845,7 +21304,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_1collide_rect(PyObject *__pyx_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("collide_rect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1357, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("collide_rect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1359, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.collide_rect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -20865,9 +21324,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_collide_rect(CYTHON_UNUSED PyObject * PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("collide_rect", 0); - /* "pygame/_sprite.pyx":1370 + /* "pygame/_sprite.pyx":1372 * * """ * return left.rect.colliderect(right.rect) # <<<<<<<<<<<<<< @@ -20875,12 +21337,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_collide_rect(CYTHON_UNUSED PyObject * * class collide_rect_ratio: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -20895,14 +21357,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_collide_rect(CYTHON_UNUSED PyObject * __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":1357 + /* "pygame/_sprite.pyx":1359 * * # Some different collision detection functions that could be used. * def collide_rect(left, right): # <<<<<<<<<<<<<< @@ -20924,7 +21386,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_collide_rect(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "pygame/_sprite.pyx":1384 +/* "pygame/_sprite.pyx":1386 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< @@ -20939,6 +21401,9 @@ static PyMethodDef __pyx_mdef_6pygame_7_sprite_18collide_rect_ratio_1__init__ = static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_ratio = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -20965,11 +21430,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_1__init__(PyObje case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ratio)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1384, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1386, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1384, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1386, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -20982,7 +21447,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_1__init__(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1384, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1386, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.collide_rect_ratio.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -20998,18 +21463,21 @@ static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_1__init__(PyObje static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ratio) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sprite.pyx":1391 + /* "pygame/_sprite.pyx":1393 * * """ * self.ratio = ratio # <<<<<<<<<<<<<< * * def __call__(self, left, right): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ratio, __pyx_v_ratio) < 0) __PYX_ERR(0, 1391, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ratio, __pyx_v_ratio) < 0) __PYX_ERR(0, 1393, __pyx_L1_error) - /* "pygame/_sprite.pyx":1384 + /* "pygame/_sprite.pyx":1386 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< @@ -21029,7 +21497,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio___init__(CYTHON_ return __pyx_r; } -/* "pygame/_sprite.pyx":1393 +/* "pygame/_sprite.pyx":1395 * self.ratio = ratio * * def __call__(self, left, right): # <<<<<<<<<<<<<< @@ -21045,6 +21513,9 @@ static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_3__call__(PyObje PyObject *__pyx_v_self = 0; PyObject *__pyx_v_left = 0; PyObject *__pyx_v_right = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -21073,17 +21544,17 @@ static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_3__call__(PyObje case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1393, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1395, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1393, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1395, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1393, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1395, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -21098,7 +21569,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_18collide_rect_ratio_3__call__(PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1393, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1395, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.collide_rect_ratio.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21126,81 +21597,84 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "pygame/_sprite.pyx":1404 + /* "pygame/_sprite.pyx":1406 * """ * * ratio = self.ratio # <<<<<<<<<<<<<< * * leftrect = left.rect */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ratio = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1406 + /* "pygame/_sprite.pyx":1408 * ratio = self.ratio * * leftrect = left.rect # <<<<<<<<<<<<<< * width = leftrect.width * height = leftrect.height */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_leftrect = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1407 + /* "pygame/_sprite.pyx":1409 * * leftrect = left.rect * width = leftrect.width # <<<<<<<<<<<<<< * height = leftrect.height * leftrect = leftrect.inflate(width * ratio - width, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_width = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1408 + /* "pygame/_sprite.pyx":1410 * leftrect = left.rect * width = leftrect.width * height = leftrect.height # <<<<<<<<<<<<<< * leftrect = leftrect.inflate(width * ratio - width, * height * ratio - height) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_height = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1409 + /* "pygame/_sprite.pyx":1411 * width = leftrect.width * height = leftrect.height * leftrect = leftrect.inflate(width * ratio - width, # <<<<<<<<<<<<<< * height * ratio - height) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_inflate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_inflate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Multiply(__pyx_v_width, __pyx_v_ratio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_width, __pyx_v_ratio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1410 + /* "pygame/_sprite.pyx":1412 * height = leftrect.height * leftrect = leftrect.inflate(width * ratio - width, * height * ratio - height) # <<<<<<<<<<<<<< * * rightrect = right.rect */ - __pyx_t_3 = PyNumber_Multiply(__pyx_v_height, __pyx_v_ratio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_height, __pyx_v_ratio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyNumber_Subtract(__pyx_t_3, __pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_5 = PyNumber_Subtract(__pyx_t_3, __pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -21218,7 +21692,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -21228,7 +21702,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -21236,7 +21710,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -21247,7 +21721,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -21255,67 +21729,67 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON __Pyx_DECREF_SET(__pyx_v_leftrect, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1412 + /* "pygame/_sprite.pyx":1414 * height * ratio - height) * * rightrect = right.rect # <<<<<<<<<<<<<< * width = rightrect.width * height = rightrect.height */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rightrect = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1413 + /* "pygame/_sprite.pyx":1415 * * rightrect = right.rect * width = rightrect.width # <<<<<<<<<<<<<< * height = rightrect.height * rightrect = rightrect.inflate(width * ratio - width, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_width, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1414 + /* "pygame/_sprite.pyx":1416 * rightrect = right.rect * width = rightrect.width * height = rightrect.height # <<<<<<<<<<<<<< * rightrect = rightrect.inflate(width * ratio - width, * height * ratio - height) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1414, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_height, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1415 + /* "pygame/_sprite.pyx":1417 * width = rightrect.width * height = rightrect.height * rightrect = rightrect.inflate(width * ratio - width, # <<<<<<<<<<<<<< * height * ratio - height) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_inflate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_inflate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyNumber_Multiply(__pyx_v_width, __pyx_v_ratio); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_v_width, __pyx_v_ratio); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = PyNumber_Subtract(__pyx_t_7, __pyx_v_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_5 = PyNumber_Subtract(__pyx_t_7, __pyx_v_width); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "pygame/_sprite.pyx":1416 + /* "pygame/_sprite.pyx":1418 * height = rightrect.height * rightrect = rightrect.inflate(width * ratio - width, * height * ratio - height) # <<<<<<<<<<<<<< * * return leftrect.colliderect(rightrect) */ - __pyx_t_7 = PyNumber_Multiply(__pyx_v_height, __pyx_v_ratio); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_7 = PyNumber_Multiply(__pyx_v_height, __pyx_v_ratio); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = PyNumber_Subtract(__pyx_t_7, __pyx_v_height); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_4 = PyNumber_Subtract(__pyx_t_7, __pyx_v_height); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -21333,7 +21807,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -21343,7 +21817,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -21351,7 +21825,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -21362,7 +21836,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_4); __pyx_t_5 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -21370,7 +21844,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON __Pyx_DECREF_SET(__pyx_v_rightrect, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1418 + /* "pygame/_sprite.pyx":1420 * height * ratio - height) * * return leftrect.colliderect(rightrect) # <<<<<<<<<<<<<< @@ -21378,7 +21852,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON * def collide_circle(left, right): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -21392,14 +21866,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_rightrect) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_rightrect); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":1393 + /* "pygame/_sprite.pyx":1395 * self.ratio = ratio * * def __call__(self, left, right): # <<<<<<<<<<<<<< @@ -21428,7 +21902,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_18collide_rect_ratio_2__call__(CYTHON return __pyx_r; } -/* "pygame/_sprite.pyx":1420 +/* "pygame/_sprite.pyx":1422 * return leftrect.colliderect(rightrect) * * def collide_circle(left, right): # <<<<<<<<<<<<<< @@ -21443,6 +21917,9 @@ static PyMethodDef __pyx_mdef_6pygame_7_sprite_3collide_circle = {"collide_circl static PyObject *__pyx_pw_6pygame_7_sprite_3collide_circle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_left = 0; PyObject *__pyx_v_right = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("collide_circle (wrapper)", 0); @@ -21469,11 +21946,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_3collide_circle(PyObject *__pyx_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("collide_circle", 1, 2, 2, 1); __PYX_ERR(0, 1420, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("collide_circle", 1, 2, 2, 1); __PYX_ERR(0, 1422, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "collide_circle") < 0)) __PYX_ERR(0, 1420, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "collide_circle") < 0)) __PYX_ERR(0, 1422, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -21486,7 +21963,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_3collide_circle(PyObject *__pyx_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("collide_circle", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1420, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("collide_circle", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1422, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.collide_circle", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21515,98 +21992,101 @@ static PyObject *__pyx_pf_6pygame_7_sprite_2collide_circle(CYTHON_UNUSED PyObjec int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("collide_circle", 0); - /* "pygame/_sprite.pyx":1437 + /* "pygame/_sprite.pyx":1439 * """ * * xdistance = left.rect.centerx - right.rect.centerx # <<<<<<<<<<<<<< * ydistance = left.rect.centery - right.rect.centery * distancesquared = xdistance ** 2 + ydistance ** 2 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xdistance = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1438 + /* "pygame/_sprite.pyx":1440 * * xdistance = left.rect.centerx - right.rect.centerx * ydistance = left.rect.centery - right.rect.centery # <<<<<<<<<<<<<< * distancesquared = xdistance ** 2 + ydistance ** 2 * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ydistance = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1439 + /* "pygame/_sprite.pyx":1441 * xdistance = left.rect.centerx - right.rect.centerx * ydistance = left.rect.centery - right.rect.centery * distancesquared = xdistance ** 2 + ydistance ** 2 # <<<<<<<<<<<<<< * * if hasattr(left, 'radius'): */ - __pyx_t_1 = PyNumber_Power(__pyx_v_xdistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error) + __pyx_t_1 = PyNumber_Power(__pyx_v_xdistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Power(__pyx_v_ydistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1439, __pyx_L1_error) + __pyx_t_2 = PyNumber_Power(__pyx_v_ydistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1439, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_distancesquared = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1441 + /* "pygame/_sprite.pyx":1443 * distancesquared = xdistance ** 2 + ydistance ** 2 * * if hasattr(left, 'radius'): # <<<<<<<<<<<<<< * leftradius = left.radius * else: */ - __pyx_t_4 = __Pyx_HasAttr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1441, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1443, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":1442 + /* "pygame/_sprite.pyx":1444 * * if hasattr(left, 'radius'): * leftradius = left.radius # <<<<<<<<<<<<<< * else: * leftrect = left.rect */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1442, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_leftradius = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1441 + /* "pygame/_sprite.pyx":1443 * distancesquared = xdistance ** 2 + ydistance ** 2 * * if hasattr(left, 'radius'): # <<<<<<<<<<<<<< @@ -21616,7 +22096,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_2collide_circle(CYTHON_UNUSED PyObjec goto __pyx_L3; } - /* "pygame/_sprite.pyx":1444 + /* "pygame/_sprite.pyx":1446 * leftradius = left.radius * else: * leftrect = left.rect # <<<<<<<<<<<<<< @@ -21624,76 +22104,76 @@ static PyObject *__pyx_pf_6pygame_7_sprite_2collide_circle(CYTHON_UNUSED PyObjec * # might give false positives (especially if its a long small rect) */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1444, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_leftrect = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1447 + /* "pygame/_sprite.pyx":1449 * # approximating the radius of a square by using half of the diagonal, * # might give false positives (especially if its a long small rect) * leftradius = 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) # <<<<<<<<<<<<<< * # store the radius on the sprite for next time * setattr(left, 'radius', leftradius) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Multiply(__pyx_float_0_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_float_0_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_leftradius = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1449 + /* "pygame/_sprite.pyx":1451 * leftradius = 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) * # store the radius on the sprite for next time * setattr(left, 'radius', leftradius) # <<<<<<<<<<<<<< * * if hasattr(right, 'radius'): */ - __pyx_t_6 = PyObject_SetAttr(__pyx_v_left, __pyx_n_s_radius, __pyx_v_leftradius); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1449, __pyx_L1_error) + __pyx_t_6 = PyObject_SetAttr(__pyx_v_left, __pyx_n_s_radius, __pyx_v_leftradius); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1451, __pyx_L1_error) } __pyx_L3:; - /* "pygame/_sprite.pyx":1451 + /* "pygame/_sprite.pyx":1453 * setattr(left, 'radius', leftradius) * * if hasattr(right, 'radius'): # <<<<<<<<<<<<<< * rightradius = right.radius * else: */ - __pyx_t_5 = __Pyx_HasAttr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1451, __pyx_L1_error) + __pyx_t_5 = __Pyx_HasAttr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1453, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1452 + /* "pygame/_sprite.pyx":1454 * * if hasattr(right, 'radius'): * rightradius = right.radius # <<<<<<<<<<<<<< * else: * rightrect = right.rect */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1452, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rightradius = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1451 + /* "pygame/_sprite.pyx":1453 * setattr(left, 'radius', leftradius) * * if hasattr(right, 'radius'): # <<<<<<<<<<<<<< @@ -21703,7 +22183,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_2collide_circle(CYTHON_UNUSED PyObjec goto __pyx_L4; } - /* "pygame/_sprite.pyx":1454 + /* "pygame/_sprite.pyx":1456 * rightradius = right.radius * else: * rightrect = right.rect # <<<<<<<<<<<<<< @@ -21711,53 +22191,53 @@ static PyObject *__pyx_pf_6pygame_7_sprite_2collide_circle(CYTHON_UNUSED PyObjec * # might give false positives (especially if its a long small rect) */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1454, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rightrect = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1457 + /* "pygame/_sprite.pyx":1459 * # approximating the radius of a square by using half of the diagonal * # might give false positives (especially if its a long small rect) * rightradius = 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) # <<<<<<<<<<<<<< * # store the radius on the sprite for next time * setattr(right, 'radius', rightradius) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Multiply(__pyx_float_0_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_float_0_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_rightradius = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1459 + /* "pygame/_sprite.pyx":1461 * rightradius = 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) * # store the radius on the sprite for next time * setattr(right, 'radius', rightradius) # <<<<<<<<<<<<<< * return distancesquared <= (leftradius + rightradius) ** 2 * */ - __pyx_t_6 = PyObject_SetAttr(__pyx_v_right, __pyx_n_s_radius, __pyx_v_rightradius); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1459, __pyx_L1_error) + __pyx_t_6 = PyObject_SetAttr(__pyx_v_right, __pyx_n_s_radius, __pyx_v_rightradius); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1461, __pyx_L1_error) } __pyx_L4:; - /* "pygame/_sprite.pyx":1460 + /* "pygame/_sprite.pyx":1462 * # store the radius on the sprite for next time * setattr(right, 'radius', rightradius) * return distancesquared <= (leftradius + rightradius) ** 2 # <<<<<<<<<<<<<< @@ -21765,18 +22245,18 @@ static PyObject *__pyx_pf_6pygame_7_sprite_2collide_circle(CYTHON_UNUSED PyObjec * class collide_circle_ratio(object): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyNumber_Add(__pyx_v_leftradius, __pyx_v_rightradius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_leftradius, __pyx_v_rightradius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_v_distancesquared, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_distancesquared, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":1420 + /* "pygame/_sprite.pyx":1422 * return leftrect.colliderect(rightrect) * * def collide_circle(left, right): # <<<<<<<<<<<<<< @@ -21804,7 +22284,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_2collide_circle(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "pygame/_sprite.pyx":1474 +/* "pygame/_sprite.pyx":1476 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< @@ -21819,6 +22299,9 @@ static PyMethodDef __pyx_mdef_6pygame_7_sprite_20collide_circle_ratio_1__init__ static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_ratio = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -21845,11 +22328,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_1__init__(PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ratio)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1474, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1476, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1474, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1476, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -21862,7 +22345,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_1__init__(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1474, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1476, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.collide_circle_ratio.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21878,18 +22361,21 @@ static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_1__init__(PyOb static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ratio) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "pygame/_sprite.pyx":1484 + /* "pygame/_sprite.pyx":1486 * * """ * self.ratio = ratio # <<<<<<<<<<<<<< * * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ratio, __pyx_v_ratio) < 0) __PYX_ERR(0, 1484, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ratio, __pyx_v_ratio) < 0) __PYX_ERR(0, 1486, __pyx_L1_error) - /* "pygame/_sprite.pyx":1474 + /* "pygame/_sprite.pyx":1476 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< @@ -21909,7 +22395,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio___init__(CYTHO return __pyx_r; } -/* "pygame/_sprite.pyx":1487 +/* "pygame/_sprite.pyx":1489 * * * def __call__(self, left, right): # <<<<<<<<<<<<<< @@ -21925,6 +22411,9 @@ static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_3__call__(PyOb PyObject *__pyx_v_self = 0; PyObject *__pyx_v_left = 0; PyObject *__pyx_v_right = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -21953,17 +22442,17 @@ static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_3__call__(PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1487, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); __PYX_ERR(0, 1489, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1487, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); __PYX_ERR(0, 1489, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1487, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1489, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -21978,7 +22467,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_20collide_circle_ratio_3__call__(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1487, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1489, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.collide_circle_ratio.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -22009,113 +22498,116 @@ static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio_2__call__(CYTH int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "pygame/_sprite.pyx":1503 + /* "pygame/_sprite.pyx":1505 * """ * * ratio = self.ratio # <<<<<<<<<<<<<< * xdistance = left.rect.centerx - right.rect.centerx * ydistance = left.rect.centery - right.rect.centery */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1503, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ratio); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ratio = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1504 + /* "pygame/_sprite.pyx":1506 * * ratio = self.ratio * xdistance = left.rect.centerx - right.rect.centerx # <<<<<<<<<<<<<< * ydistance = left.rect.centery - right.rect.centery * distancesquared = xdistance ** 2 + ydistance ** 2 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centerx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xdistance = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1505 + /* "pygame/_sprite.pyx":1507 * ratio = self.ratio * xdistance = left.rect.centerx - right.rect.centerx * ydistance = left.rect.centery - right.rect.centery # <<<<<<<<<<<<<< * distancesquared = xdistance ** 2 + ydistance ** 2 * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_centery); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ydistance = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1506 + /* "pygame/_sprite.pyx":1508 * xdistance = left.rect.centerx - right.rect.centerx * ydistance = left.rect.centery - right.rect.centery * distancesquared = xdistance ** 2 + ydistance ** 2 # <<<<<<<<<<<<<< * * if hasattr(left, "radius"): */ - __pyx_t_1 = PyNumber_Power(__pyx_v_xdistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_t_1 = PyNumber_Power(__pyx_v_xdistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Power(__pyx_v_ydistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_t_2 = PyNumber_Power(__pyx_v_ydistance, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_distancesquared = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1508 + /* "pygame/_sprite.pyx":1510 * distancesquared = xdistance ** 2 + ydistance ** 2 * * if hasattr(left, "radius"): # <<<<<<<<<<<<<< * leftradius = left.radius * ratio * else: */ - __pyx_t_4 = __Pyx_HasAttr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1508, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1510, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "pygame/_sprite.pyx":1509 + /* "pygame/_sprite.pyx":1511 * * if hasattr(left, "radius"): * leftradius = left.radius * ratio # <<<<<<<<<<<<<< * else: * leftrect = left.rect */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1509, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_v_ratio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error) + __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_v_ratio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_leftradius = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1508 + /* "pygame/_sprite.pyx":1510 * distancesquared = xdistance ** 2 + ydistance ** 2 * * if hasattr(left, "radius"): # <<<<<<<<<<<<<< @@ -22125,7 +22617,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio_2__call__(CYTH goto __pyx_L3; } - /* "pygame/_sprite.pyx":1511 + /* "pygame/_sprite.pyx":1513 * leftradius = left.radius * ratio * else: * leftrect = left.rect # <<<<<<<<<<<<<< @@ -22133,82 +22625,82 @@ static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio_2__call__(CYTH * # store the radius on the sprite for next time */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1511, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_leftrect = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1512 + /* "pygame/_sprite.pyx":1514 * else: * leftrect = left.rect * leftradius = ratio * 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) # <<<<<<<<<<<<<< * # store the radius on the sprite for next time * setattr(left, 'radius', leftradius) */ - __pyx_t_2 = PyNumber_Multiply(__pyx_v_ratio, __pyx_float_0_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_t_2 = PyNumber_Multiply(__pyx_v_ratio, __pyx_float_0_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_t_6 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_t_6 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_leftradius = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1514 + /* "pygame/_sprite.pyx":1516 * leftradius = ratio * 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) * # store the radius on the sprite for next time * setattr(left, 'radius', leftradius) # <<<<<<<<<<<<<< * * if hasattr(right, "radius"): */ - __pyx_t_7 = PyObject_SetAttr(__pyx_v_left, __pyx_n_s_radius, __pyx_v_leftradius); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_7 = PyObject_SetAttr(__pyx_v_left, __pyx_n_s_radius, __pyx_v_leftradius); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1516, __pyx_L1_error) } __pyx_L3:; - /* "pygame/_sprite.pyx":1516 + /* "pygame/_sprite.pyx":1518 * setattr(left, 'radius', leftradius) * * if hasattr(right, "radius"): # <<<<<<<<<<<<<< * rightradius = right.radius * ratio * else: */ - __pyx_t_5 = __Pyx_HasAttr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1516, __pyx_L1_error) + __pyx_t_5 = __Pyx_HasAttr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1518, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":1517 + /* "pygame/_sprite.pyx":1519 * * if hasattr(right, "radius"): * rightradius = right.radius * ratio # <<<<<<<<<<<<<< * else: * rightrect = right.rect */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_v_ratio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_3, __pyx_v_ratio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_rightradius = __pyx_t_6; __pyx_t_6 = 0; - /* "pygame/_sprite.pyx":1516 + /* "pygame/_sprite.pyx":1518 * setattr(left, 'radius', leftradius) * * if hasattr(right, "radius"): # <<<<<<<<<<<<<< @@ -22218,7 +22710,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio_2__call__(CYTH goto __pyx_L4; } - /* "pygame/_sprite.pyx":1519 + /* "pygame/_sprite.pyx":1521 * rightradius = right.radius * ratio * else: * rightrect = right.rect # <<<<<<<<<<<<<< @@ -22226,56 +22718,56 @@ static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio_2__call__(CYTH * # store the radius on the sprite for next time */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1519, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_rightrect = __pyx_t_6; __pyx_t_6 = 0; - /* "pygame/_sprite.pyx":1520 + /* "pygame/_sprite.pyx":1522 * else: * rightrect = right.rect * rightradius = ratio * 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) # <<<<<<<<<<<<<< * # store the radius on the sprite for next time * setattr(right, 'radius', rightradius) */ - __pyx_t_6 = PyNumber_Multiply(__pyx_v_ratio, __pyx_float_0_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_v_ratio, __pyx_float_0_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_width); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_2 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rightrect, __pyx_n_s_height); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Multiply(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rightradius = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1522 + /* "pygame/_sprite.pyx":1524 * rightradius = ratio * 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) * # store the radius on the sprite for next time * setattr(right, 'radius', rightradius) # <<<<<<<<<<<<<< * * return distancesquared <= (leftradius + rightradius) ** 2 */ - __pyx_t_7 = PyObject_SetAttr(__pyx_v_right, __pyx_n_s_radius, __pyx_v_rightradius); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_t_7 = PyObject_SetAttr(__pyx_v_right, __pyx_n_s_radius, __pyx_v_rightradius); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1524, __pyx_L1_error) } __pyx_L4:; - /* "pygame/_sprite.pyx":1524 + /* "pygame/_sprite.pyx":1526 * setattr(right, 'radius', rightradius) * * return distancesquared <= (leftradius + rightradius) ** 2 # <<<<<<<<<<<<<< @@ -22283,18 +22775,18 @@ static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio_2__call__(CYTH * def collide_mask(left, right): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyNumber_Add(__pyx_v_leftradius, __pyx_v_rightradius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1524, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_leftradius, __pyx_v_rightradius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error) + __pyx_t_1 = PyNumber_Power(__pyx_t_3, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_v_distancesquared, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1524, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_distancesquared, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":1487 + /* "pygame/_sprite.pyx":1489 * * * def __call__(self, left, right): # <<<<<<<<<<<<<< @@ -22324,7 +22816,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_20collide_circle_ratio_2__call__(CYTH return __pyx_r; } -/* "pygame/_sprite.pyx":1526 +/* "pygame/_sprite.pyx":1528 * return distancesquared <= (leftradius + rightradius) ** 2 * * def collide_mask(left, right): # <<<<<<<<<<<<<< @@ -22339,6 +22831,9 @@ static PyMethodDef __pyx_mdef_6pygame_7_sprite_5collide_mask = {"collide_mask", static PyObject *__pyx_pw_6pygame_7_sprite_5collide_mask(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_left = 0; PyObject *__pyx_v_right = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("collide_mask (wrapper)", 0); @@ -22365,11 +22860,11 @@ static PyObject *__pyx_pw_6pygame_7_sprite_5collide_mask(PyObject *__pyx_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("collide_mask", 1, 2, 2, 1); __PYX_ERR(0, 1526, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("collide_mask", 1, 2, 2, 1); __PYX_ERR(0, 1528, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "collide_mask") < 0)) __PYX_ERR(0, 1526, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "collide_mask") < 0)) __PYX_ERR(0, 1528, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -22382,7 +22877,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_5collide_mask(PyObject *__pyx_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("collide_mask", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1526, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("collide_mask", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1528, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.collide_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -22413,57 +22908,60 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("collide_mask", 0); - /* "pygame/_sprite.pyx":1540 + /* "pygame/_sprite.pyx":1542 * * """ * xoffset = right.rect[0] - left.rect[0] # <<<<<<<<<<<<<< * yoffset = right.rect[1] - left.rect[1] * try: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_xoffset = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1541 + /* "pygame/_sprite.pyx":1543 * """ * xoffset = right.rect[0] - left.rect[0] * yoffset = right.rect[1] - left.rect[1] # <<<<<<<<<<<<<< * try: * leftmask = left.mask */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_yoffset = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1542 + /* "pygame/_sprite.pyx":1544 * xoffset = right.rect[0] - left.rect[0] * yoffset = right.rect[1] - left.rect[1] * try: # <<<<<<<<<<<<<< @@ -22479,19 +22977,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "pygame/_sprite.pyx":1543 + /* "pygame/_sprite.pyx":1545 * yoffset = right.rect[1] - left.rect[1] * try: * leftmask = left.mask # <<<<<<<<<<<<<< * except AttributeError: * leftmask = from_surface(left.image) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L3_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_leftmask = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1542 + /* "pygame/_sprite.pyx":1544 * xoffset = right.rect[0] - left.rect[0] * yoffset = right.rect[1] - left.rect[1] * try: # <<<<<<<<<<<<<< @@ -22508,7 +23006,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1544 + /* "pygame/_sprite.pyx":1546 * try: * leftmask = left.mask * except AttributeError: # <<<<<<<<<<<<<< @@ -22518,21 +23016,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("pygame._sprite.collide_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 1544, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 1546, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); - /* "pygame/_sprite.pyx":1545 + /* "pygame/_sprite.pyx":1547 * leftmask = left.mask * except AttributeError: * leftmask = from_surface(left.image) # <<<<<<<<<<<<<< * try: * rightmask = right.mask */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1545, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1547, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_image); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1545, __pyx_L5_except_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_left, __pyx_n_s_image); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1547, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { @@ -22547,7 +23045,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1545, __pyx_L5_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1547, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_leftmask, __pyx_t_8); @@ -22560,7 +23058,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "pygame/_sprite.pyx":1542 + /* "pygame/_sprite.pyx":1544 * xoffset = right.rect[0] - left.rect[0] * yoffset = right.rect[1] - left.rect[1] * try: # <<<<<<<<<<<<<< @@ -22580,7 +23078,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __pyx_L8_try_end:; } - /* "pygame/_sprite.pyx":1546 + /* "pygame/_sprite.pyx":1548 * except AttributeError: * leftmask = from_surface(left.image) * try: # <<<<<<<<<<<<<< @@ -22596,19 +23094,19 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "pygame/_sprite.pyx":1547 + /* "pygame/_sprite.pyx":1549 * leftmask = from_surface(left.image) * try: * rightmask = right.mask # <<<<<<<<<<<<<< * except AttributeError: * rightmask = from_surface(right.image) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L11_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_mask); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rightmask = __pyx_t_3; __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1546 + /* "pygame/_sprite.pyx":1548 * except AttributeError: * leftmask = from_surface(left.image) * try: # <<<<<<<<<<<<<< @@ -22629,7 +23127,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pygame/_sprite.pyx":1548 + /* "pygame/_sprite.pyx":1550 * try: * rightmask = right.mask * except AttributeError: # <<<<<<<<<<<<<< @@ -22639,21 +23137,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError); if (__pyx_t_7) { __Pyx_AddTraceback("pygame._sprite.collide_mask", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1548, __pyx_L13_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1550, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); - /* "pygame/_sprite.pyx":1549 + /* "pygame/_sprite.pyx":1551 * rightmask = right.mask * except AttributeError: * rightmask = from_surface(right.image) # <<<<<<<<<<<<<< * return leftmask.overlap(rightmask, (xoffset, yoffset)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1549, __pyx_L13_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1551, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_image); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1549, __pyx_L13_except_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_right, __pyx_n_s_image); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1551, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { @@ -22668,7 +23166,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __pyx_t_8 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_11, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1549, __pyx_L13_except_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1551, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_rightmask, __pyx_t_8); @@ -22681,7 +23179,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject goto __pyx_L13_except_error; __pyx_L13_except_error:; - /* "pygame/_sprite.pyx":1546 + /* "pygame/_sprite.pyx":1548 * except AttributeError: * leftmask = from_surface(left.image) * try: # <<<<<<<<<<<<<< @@ -22701,7 +23199,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __pyx_L16_try_end:; } - /* "pygame/_sprite.pyx":1550 + /* "pygame/_sprite.pyx":1552 * except AttributeError: * rightmask = from_surface(right.image) * return leftmask.overlap(rightmask, (xoffset, yoffset)) # <<<<<<<<<<<<<< @@ -22709,9 +23207,9 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject * def spritecollide(sprite, group, dokill, collided=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftmask, __pyx_n_s_overlap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_leftmask, __pyx_n_s_overlap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_xoffset); __Pyx_GIVEREF(__pyx_v_xoffset); @@ -22734,7 +23232,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_rightmask, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -22743,14 +23241,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_rightmask, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -22761,7 +23259,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -22770,7 +23268,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject __pyx_t_1 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":1526 + /* "pygame/_sprite.pyx":1528 * return distancesquared <= (leftradius + rightradius) ** 2 * * def collide_mask(left, right): # <<<<<<<<<<<<<< @@ -22799,7 +23297,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_4collide_mask(CYTHON_UNUSED PyObject return __pyx_r; } -/* "pygame/_sprite.pyx":1552 +/* "pygame/_sprite.pyx":1554 * return leftmask.overlap(rightmask, (xoffset, yoffset)) * * def spritecollide(sprite, group, dokill, collided=None): # <<<<<<<<<<<<<< @@ -22816,6 +23314,9 @@ static PyObject *__pyx_pw_6pygame_7_sprite_7spritecollide(PyObject *__pyx_self, PyObject *__pyx_v_group = 0; PyObject *__pyx_v_dokill = 0; PyObject *__pyx_v_collided = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("spritecollide (wrapper)", 0); @@ -22847,13 +23348,13 @@ static PyObject *__pyx_pw_6pygame_7_sprite_7spritecollide(PyObject *__pyx_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("spritecollide", 0, 3, 4, 1); __PYX_ERR(0, 1552, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("spritecollide", 0, 3, 4, 1); __PYX_ERR(0, 1554, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dokill)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("spritecollide", 0, 3, 4, 2); __PYX_ERR(0, 1552, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("spritecollide", 0, 3, 4, 2); __PYX_ERR(0, 1554, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -22863,7 +23364,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_7spritecollide(PyObject *__pyx_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "spritecollide") < 0)) __PYX_ERR(0, 1552, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "spritecollide") < 0)) __PYX_ERR(0, 1554, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -22883,7 +23384,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_7spritecollide(PyObject *__pyx_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("spritecollide", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1552, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("spritecollide", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1554, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.spritecollide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -22914,60 +23415,63 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("spritecollide", 0); - /* "pygame/_sprite.pyx":1572 + /* "pygame/_sprite.pyx":1574 * * """ * if dokill: # <<<<<<<<<<<<<< * * crashed = [] */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dokill); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dokill); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1574, __pyx_L1_error) if (__pyx_t_1) { - /* "pygame/_sprite.pyx":1574 + /* "pygame/_sprite.pyx":1576 * if dokill: * * crashed = [] # <<<<<<<<<<<<<< * append = crashed.append * */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_crashed = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1575 + /* "pygame/_sprite.pyx":1577 * * crashed = [] * append = crashed.append # <<<<<<<<<<<<<< * * if collided: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_crashed, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_crashed, __pyx_n_s_append); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_append = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1577 + /* "pygame/_sprite.pyx":1579 * append = crashed.append * * if collided: # <<<<<<<<<<<<<< * for s in group.sprites(): * if collided(sprite, s): */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_collided); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_collided); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1579, __pyx_L1_error) if (__pyx_t_1) { - /* "pygame/_sprite.pyx":1578 + /* "pygame/_sprite.pyx":1580 * * if collided: * for s in group.sprites(): # <<<<<<<<<<<<<< * if collided(sprite, s): * s.kill() */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -22981,16 +23485,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1578, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1580, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -22998,17 +23502,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1580, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1580, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -23018,7 +23522,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1578, __pyx_L1_error) + else __PYX_ERR(0, 1580, __pyx_L1_error) } break; } @@ -23027,7 +23531,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1579 + /* "pygame/_sprite.pyx":1581 * if collided: * for s in group.sprites(): * if collided(sprite, s): # <<<<<<<<<<<<<< @@ -23050,7 +23554,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_sprite, __pyx_v_s}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -23058,13 +23562,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_sprite, __pyx_v_s}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -23075,23 +23579,23 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_s); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "pygame/_sprite.pyx":1580 + /* "pygame/_sprite.pyx":1582 * for s in group.sprites(): * if collided(sprite, s): * s.kill() # <<<<<<<<<<<<<< * append(s) * else: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_kill); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_kill); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -23105,21 +23609,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject } __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1581 + /* "pygame/_sprite.pyx":1583 * if collided(sprite, s): * s.kill() * append(s) # <<<<<<<<<<<<<< * else: * spritecollide = sprite.rect.colliderect */ - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_crashed, __pyx_v_s); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1581, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_crashed, __pyx_v_s); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1583, __pyx_L1_error) - /* "pygame/_sprite.pyx":1579 + /* "pygame/_sprite.pyx":1581 * if collided: * for s in group.sprites(): * if collided(sprite, s): # <<<<<<<<<<<<<< @@ -23128,7 +23632,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject */ } - /* "pygame/_sprite.pyx":1578 + /* "pygame/_sprite.pyx":1580 * * if collided: * for s in group.sprites(): # <<<<<<<<<<<<<< @@ -23138,7 +23642,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1577 + /* "pygame/_sprite.pyx":1579 * append = crashed.append * * if collided: # <<<<<<<<<<<<<< @@ -23148,7 +23652,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject goto __pyx_L4; } - /* "pygame/_sprite.pyx":1583 + /* "pygame/_sprite.pyx":1585 * append(s) * else: * spritecollide = sprite.rect.colliderect # <<<<<<<<<<<<<< @@ -23156,22 +23660,22 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject * if spritecollide(s.rect): */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1583, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_spritecollide = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1584 + /* "pygame/_sprite.pyx":1586 * else: * spritecollide = sprite.rect.colliderect * for s in group.sprites(): # <<<<<<<<<<<<<< * if spritecollide(s.rect): * s.kill() */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_group, __pyx_n_s_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -23185,16 +23689,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1586, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -23202,17 +23706,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1586, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1586, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -23222,7 +23726,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1584, __pyx_L1_error) + else __PYX_ERR(0, 1586, __pyx_L1_error) } break; } @@ -23231,14 +23735,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1585 + /* "pygame/_sprite.pyx":1587 * spritecollide = sprite.rect.colliderect * for s in group.sprites(): * if spritecollide(s.rect): # <<<<<<<<<<<<<< * s.kill() * append(s) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_spritecollide); __pyx_t_9 = __pyx_v_spritecollide; __pyx_t_7 = NULL; @@ -23254,21 +23758,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1585, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1587, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "pygame/_sprite.pyx":1586 + /* "pygame/_sprite.pyx":1588 * for s in group.sprites(): * if spritecollide(s.rect): * s.kill() # <<<<<<<<<<<<<< * append(s) * */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_kill); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1586, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_kill); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -23282,21 +23786,21 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1587 + /* "pygame/_sprite.pyx":1589 * if spritecollide(s.rect): * s.kill() * append(s) # <<<<<<<<<<<<<< * * return crashed */ - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_crashed, __pyx_v_s); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1587, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_crashed, __pyx_v_s); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1589, __pyx_L1_error) - /* "pygame/_sprite.pyx":1585 + /* "pygame/_sprite.pyx":1587 * spritecollide = sprite.rect.colliderect * for s in group.sprites(): * if spritecollide(s.rect): # <<<<<<<<<<<<<< @@ -23305,7 +23809,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject */ } - /* "pygame/_sprite.pyx":1584 + /* "pygame/_sprite.pyx":1586 * else: * spritecollide = sprite.rect.colliderect * for s in group.sprites(): # <<<<<<<<<<<<<< @@ -23317,7 +23821,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject } __pyx_L4:; - /* "pygame/_sprite.pyx":1589 + /* "pygame/_sprite.pyx":1591 * append(s) * * return crashed # <<<<<<<<<<<<<< @@ -23329,7 +23833,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject __pyx_r = __pyx_v_crashed; goto __pyx_L0; - /* "pygame/_sprite.pyx":1572 + /* "pygame/_sprite.pyx":1574 * * """ * if dokill: # <<<<<<<<<<<<<< @@ -23338,17 +23842,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject */ } - /* "pygame/_sprite.pyx":1591 + /* "pygame/_sprite.pyx":1593 * return crashed * * elif collided: # <<<<<<<<<<<<<< * return [s for s in group if collided(sprite, s)] * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_collided); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1591, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_collided); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1593, __pyx_L1_error) if (__pyx_t_1) { - /* "pygame/_sprite.pyx":1592 + /* "pygame/_sprite.pyx":1594 * * elif collided: * return [s for s in group if collided(sprite, s)] # <<<<<<<<<<<<<< @@ -23356,32 +23860,32 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject * spritecollide = sprite.rect.colliderect */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_v_group)) || PyTuple_CheckExact(__pyx_v_group)) { __pyx_t_2 = __pyx_v_group; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1594, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1594, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1594, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } @@ -23391,7 +23895,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1592, __pyx_L1_error) + else __PYX_ERR(0, 1594, __pyx_L1_error) } break; } @@ -23415,7 +23919,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_sprite, __pyx_v_s}; - __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_9); } else @@ -23423,13 +23927,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_sprite, __pyx_v_s}; - __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { - __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -23440,15 +23944,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_8, __pyx_v_s); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_1) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_v_s))) __PYX_ERR(0, 1592, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_v_s))) __PYX_ERR(0, 1594, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -23456,7 +23960,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject __pyx_t_3 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":1591 + /* "pygame/_sprite.pyx":1593 * return crashed * * elif collided: # <<<<<<<<<<<<<< @@ -23465,7 +23969,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject */ } - /* "pygame/_sprite.pyx":1594 + /* "pygame/_sprite.pyx":1596 * return [s for s in group if collided(sprite, s)] * else: * spritecollide = sprite.rect.colliderect # <<<<<<<<<<<<<< @@ -23473,15 +23977,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject * */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1594, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_spritecollide = __pyx_t_2; __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1595 + /* "pygame/_sprite.pyx":1597 * else: * spritecollide = sprite.rect.colliderect * return [s for s in group if spritecollide(s.rect)] # <<<<<<<<<<<<<< @@ -23489,32 +23993,32 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_group)) || PyTuple_CheckExact(__pyx_v_group)) { __pyx_t_3 = __pyx_v_group; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1597, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1597, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_9); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1597, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif } @@ -23524,7 +24028,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1595, __pyx_L1_error) + else __PYX_ERR(0, 1597, __pyx_L1_error) } break; } @@ -23532,7 +24036,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject } __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_spritecollide); __pyx_t_11 = __pyx_v_spritecollide; __pyx_t_7 = NULL; @@ -23548,13 +24052,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject __pyx_t_9 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1595, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1595, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_1) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_s))) __PYX_ERR(0, 1595, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_v_s))) __PYX_ERR(0, 1597, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -23563,7 +24067,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject goto __pyx_L0; } - /* "pygame/_sprite.pyx":1552 + /* "pygame/_sprite.pyx":1554 * return leftmask.overlap(rightmask, (xoffset, yoffset)) * * def spritecollide(sprite, group, dokill, collided=None): # <<<<<<<<<<<<<< @@ -23591,7 +24095,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_6spritecollide(CYTHON_UNUSED PyObject return __pyx_r; } -/* "pygame/_sprite.pyx":1598 +/* "pygame/_sprite.pyx":1600 * * * def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): # <<<<<<<<<<<<<< @@ -23609,6 +24113,9 @@ static PyObject *__pyx_pw_6pygame_7_sprite_9groupcollide(PyObject *__pyx_self, P PyObject *__pyx_v_dokilla = 0; PyObject *__pyx_v_dokillb = 0; PyObject *__pyx_v_collided = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("groupcollide (wrapper)", 0); @@ -23642,19 +24149,19 @@ static PyObject *__pyx_pw_6pygame_7_sprite_9groupcollide(PyObject *__pyx_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_groupb)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, 1); __PYX_ERR(0, 1598, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, 1); __PYX_ERR(0, 1600, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dokilla)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, 2); __PYX_ERR(0, 1598, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, 2); __PYX_ERR(0, 1600, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dokillb)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, 3); __PYX_ERR(0, 1598, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, 3); __PYX_ERR(0, 1600, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -23664,7 +24171,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_9groupcollide(PyObject *__pyx_self, P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupcollide") < 0)) __PYX_ERR(0, 1598, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupcollide") < 0)) __PYX_ERR(0, 1600, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -23686,7 +24193,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_9groupcollide(PyObject *__pyx_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1598, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("groupcollide", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1600, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.groupcollide", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -23715,50 +24222,53 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("groupcollide", 0); - /* "pygame/_sprite.pyx":1616 + /* "pygame/_sprite.pyx":1618 * * """ * crashed = {} # <<<<<<<<<<<<<< * SC = spritecollide * if dokilla: */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1616, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_crashed = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1617 + /* "pygame/_sprite.pyx":1619 * """ * crashed = {} * SC = spritecollide # <<<<<<<<<<<<<< * if dokilla: * for s in groupa.sprites(): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_spritecollide); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_spritecollide); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_SC = __pyx_t_1; __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1618 + /* "pygame/_sprite.pyx":1620 * crashed = {} * SC = spritecollide * if dokilla: # <<<<<<<<<<<<<< * for s in groupa.sprites(): * c = SC(s, groupb, dokillb, collided) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_dokilla); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1618, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_dokilla); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1620, __pyx_L1_error) if (__pyx_t_2) { - /* "pygame/_sprite.pyx":1619 + /* "pygame/_sprite.pyx":1621 * SC = spritecollide * if dokilla: * for s in groupa.sprites(): # <<<<<<<<<<<<<< * c = SC(s, groupb, dokillb, collided) * if c: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_groupa, __pyx_n_s_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_groupa, __pyx_n_s_sprites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -23772,16 +24282,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1621, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -23789,17 +24299,17 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1621, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1621, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -23809,7 +24319,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1619, __pyx_L1_error) + else __PYX_ERR(0, 1621, __pyx_L1_error) } break; } @@ -23818,7 +24328,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1620 + /* "pygame/_sprite.pyx":1622 * if dokilla: * for s in groupa.sprites(): * c = SC(s, groupb, dokillb, collided) # <<<<<<<<<<<<<< @@ -23841,7 +24351,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_s, __pyx_v_groupb, __pyx_v_dokillb, __pyx_v_collided}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1620, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -23849,13 +24359,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_s, __pyx_v_groupb, __pyx_v_dokillb, __pyx_v_collided}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1620, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1620, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -23872,7 +24382,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_collided); __Pyx_GIVEREF(__pyx_v_collided); PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_v_collided); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1620, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } @@ -23880,33 +24390,33 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1621 + /* "pygame/_sprite.pyx":1623 * for s in groupa.sprites(): * c = SC(s, groupb, dokillb, collided) * if c: # <<<<<<<<<<<<<< * crashed[s] = c * s.kill() */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_c); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1621, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_c); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1623, __pyx_L1_error) if (__pyx_t_2) { - /* "pygame/_sprite.pyx":1622 + /* "pygame/_sprite.pyx":1624 * c = SC(s, groupb, dokillb, collided) * if c: * crashed[s] = c # <<<<<<<<<<<<<< * s.kill() * else: */ - if (unlikely(PyDict_SetItem(__pyx_v_crashed, __pyx_v_s, __pyx_v_c) < 0)) __PYX_ERR(0, 1622, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_crashed, __pyx_v_s, __pyx_v_c) < 0)) __PYX_ERR(0, 1624, __pyx_L1_error) - /* "pygame/_sprite.pyx":1623 + /* "pygame/_sprite.pyx":1625 * if c: * crashed[s] = c * s.kill() # <<<<<<<<<<<<<< * else: * for s in groupa: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_kill); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1623, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_kill); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -23920,12 +24430,12 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1621 + /* "pygame/_sprite.pyx":1623 * for s in groupa.sprites(): * c = SC(s, groupb, dokillb, collided) * if c: # <<<<<<<<<<<<<< @@ -23934,7 +24444,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject */ } - /* "pygame/_sprite.pyx":1619 + /* "pygame/_sprite.pyx":1621 * SC = spritecollide * if dokilla: * for s in groupa.sprites(): # <<<<<<<<<<<<<< @@ -23944,7 +24454,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "pygame/_sprite.pyx":1618 + /* "pygame/_sprite.pyx":1620 * crashed = {} * SC = spritecollide * if dokilla: # <<<<<<<<<<<<<< @@ -23954,7 +24464,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject goto __pyx_L3; } - /* "pygame/_sprite.pyx":1625 + /* "pygame/_sprite.pyx":1627 * s.kill() * else: * for s in groupa: # <<<<<<<<<<<<<< @@ -23966,26 +24476,26 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject __pyx_t_3 = __pyx_v_groupa; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_groupa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1625, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_groupa); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1625, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1627, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1625, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1627, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1625, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1625, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1627, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1625, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -23995,7 +24505,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1625, __pyx_L1_error) + else __PYX_ERR(0, 1627, __pyx_L1_error) } break; } @@ -24004,7 +24514,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1626 + /* "pygame/_sprite.pyx":1628 * else: * for s in groupa: * c = SC(s, groupb, dokillb, collided) # <<<<<<<<<<<<<< @@ -24027,7 +24537,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_v_s, __pyx_v_groupb, __pyx_v_dokillb, __pyx_v_collided}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -24035,13 +24545,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_v_s, __pyx_v_groupb, __pyx_v_dokillb, __pyx_v_collided}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1626, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -24058,7 +24568,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_collided); __Pyx_GIVEREF(__pyx_v_collided); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_8, __pyx_v_collided); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -24066,26 +24576,26 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1627 + /* "pygame/_sprite.pyx":1629 * for s in groupa: * c = SC(s, groupb, dokillb, collided) * if c: # <<<<<<<<<<<<<< * crashed[s] = c * return crashed */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_c); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1627, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_c); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1629, __pyx_L1_error) if (__pyx_t_2) { - /* "pygame/_sprite.pyx":1628 + /* "pygame/_sprite.pyx":1630 * c = SC(s, groupb, dokillb, collided) * if c: * crashed[s] = c # <<<<<<<<<<<<<< * return crashed * */ - if (unlikely(PyDict_SetItem(__pyx_v_crashed, __pyx_v_s, __pyx_v_c) < 0)) __PYX_ERR(0, 1628, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_crashed, __pyx_v_s, __pyx_v_c) < 0)) __PYX_ERR(0, 1630, __pyx_L1_error) - /* "pygame/_sprite.pyx":1627 + /* "pygame/_sprite.pyx":1629 * for s in groupa: * c = SC(s, groupb, dokillb, collided) * if c: # <<<<<<<<<<<<<< @@ -24094,7 +24604,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject */ } - /* "pygame/_sprite.pyx":1625 + /* "pygame/_sprite.pyx":1627 * s.kill() * else: * for s in groupa: # <<<<<<<<<<<<<< @@ -24106,7 +24616,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject } __pyx_L3:; - /* "pygame/_sprite.pyx":1629 + /* "pygame/_sprite.pyx":1631 * if c: * crashed[s] = c * return crashed # <<<<<<<<<<<<<< @@ -24118,7 +24628,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject __pyx_r = __pyx_v_crashed; goto __pyx_L0; - /* "pygame/_sprite.pyx":1598 + /* "pygame/_sprite.pyx":1600 * * * def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): # <<<<<<<<<<<<<< @@ -24145,7 +24655,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_8groupcollide(CYTHON_UNUSED PyObject return __pyx_r; } -/* "pygame/_sprite.pyx":1631 +/* "pygame/_sprite.pyx":1633 * return crashed * * def spritecollideany(sprite, group, collided=None): # <<<<<<<<<<<<<< @@ -24161,6 +24671,9 @@ static PyObject *__pyx_pw_6pygame_7_sprite_11spritecollideany(PyObject *__pyx_se PyObject *__pyx_v_sprite = 0; PyObject *__pyx_v_group = 0; PyObject *__pyx_v_collided = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("spritecollideany (wrapper)", 0); @@ -24190,7 +24703,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_11spritecollideany(PyObject *__pyx_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("spritecollideany", 0, 2, 3, 1); __PYX_ERR(0, 1631, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("spritecollideany", 0, 2, 3, 1); __PYX_ERR(0, 1633, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -24200,7 +24713,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_11spritecollideany(PyObject *__pyx_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "spritecollideany") < 0)) __PYX_ERR(0, 1631, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "spritecollideany") < 0)) __PYX_ERR(0, 1633, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -24218,7 +24731,7 @@ static PyObject *__pyx_pw_6pygame_7_sprite_11spritecollideany(PyObject *__pyx_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("spritecollideany", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1631, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("spritecollideany", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1633, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pygame._sprite.spritecollideany", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -24245,19 +24758,22 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("spritecollideany", 0); - /* "pygame/_sprite.pyx":1651 + /* "pygame/_sprite.pyx":1653 * * """ * if collided: # <<<<<<<<<<<<<< * for s in group: * if collided(sprite, s): */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_collided); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1651, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_collided); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1653, __pyx_L1_error) if (__pyx_t_1) { - /* "pygame/_sprite.pyx":1652 + /* "pygame/_sprite.pyx":1654 * """ * if collided: * for s in group: # <<<<<<<<<<<<<< @@ -24268,26 +24784,26 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb __pyx_t_2 = __pyx_v_group; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1654, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1654, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1654, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -24297,7 +24813,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1652, __pyx_L1_error) + else __PYX_ERR(0, 1654, __pyx_L1_error) } break; } @@ -24306,7 +24822,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; - /* "pygame/_sprite.pyx":1653 + /* "pygame/_sprite.pyx":1655 * if collided: * for s in group: * if collided(sprite, s): # <<<<<<<<<<<<<< @@ -24329,7 +24845,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_sprite, __pyx_v_s}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1653, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -24337,13 +24853,13 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_sprite, __pyx_v_s}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1653, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1653, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -24354,16 +24870,16 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb __Pyx_INCREF(__pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_s); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1653, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1653, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "pygame/_sprite.pyx":1654 + /* "pygame/_sprite.pyx":1656 * for s in group: * if collided(sprite, s): * return s # <<<<<<<<<<<<<< @@ -24376,7 +24892,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":1653 + /* "pygame/_sprite.pyx":1655 * if collided: * for s in group: * if collided(sprite, s): # <<<<<<<<<<<<<< @@ -24385,7 +24901,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb */ } - /* "pygame/_sprite.pyx":1652 + /* "pygame/_sprite.pyx":1654 * """ * if collided: * for s in group: # <<<<<<<<<<<<<< @@ -24395,7 +24911,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1651 + /* "pygame/_sprite.pyx":1653 * * """ * if collided: # <<<<<<<<<<<<<< @@ -24405,7 +24921,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb goto __pyx_L3; } - /* "pygame/_sprite.pyx":1657 + /* "pygame/_sprite.pyx":1659 * else: * # Special case old behaviour for speed. * spritecollide = sprite.rect.colliderect # <<<<<<<<<<<<<< @@ -24413,15 +24929,15 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb * if spritecollide(s.rect): */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1657, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sprite, __pyx_n_s_rect); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1657, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_colliderect); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_spritecollide = __pyx_t_5; __pyx_t_5 = 0; - /* "pygame/_sprite.pyx":1658 + /* "pygame/_sprite.pyx":1660 * # Special case old behaviour for speed. * spritecollide = sprite.rect.colliderect * for s in group: # <<<<<<<<<<<<<< @@ -24432,26 +24948,26 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb __pyx_t_5 = __pyx_v_group; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1660, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1660, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1660, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -24461,7 +24977,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1658, __pyx_L1_error) + else __PYX_ERR(0, 1660, __pyx_L1_error) } break; } @@ -24470,14 +24986,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1659 + /* "pygame/_sprite.pyx":1661 * spritecollide = sprite.rect.colliderect * for s in group: * if spritecollide(s.rect): # <<<<<<<<<<<<<< * return s * return None */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1659, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_rect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_spritecollide); __pyx_t_9 = __pyx_v_spritecollide; __pyx_t_7 = NULL; @@ -24493,14 +25009,14 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1659, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "pygame/_sprite.pyx":1660 + /* "pygame/_sprite.pyx":1662 * for s in group: * if spritecollide(s.rect): * return s # <<<<<<<<<<<<<< @@ -24512,7 +25028,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; - /* "pygame/_sprite.pyx":1659 + /* "pygame/_sprite.pyx":1661 * spritecollide = sprite.rect.colliderect * for s in group: * if spritecollide(s.rect): # <<<<<<<<<<<<<< @@ -24521,7 +25037,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb */ } - /* "pygame/_sprite.pyx":1658 + /* "pygame/_sprite.pyx":1660 * # Special case old behaviour for speed. * spritecollide = sprite.rect.colliderect * for s in group: # <<<<<<<<<<<<<< @@ -24533,7 +25049,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb } __pyx_L3:; - /* "pygame/_sprite.pyx":1661 + /* "pygame/_sprite.pyx":1663 * if spritecollide(s.rect): * return s * return None # <<<<<<<<<<<<<< @@ -24542,7 +25058,7 @@ static PyObject *__pyx_pf_6pygame_7_sprite_10spritecollideany(CYTHON_UNUSED PyOb __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "pygame/_sprite.pyx":1631 + /* "pygame/_sprite.pyx":1633 * return crashed * * def spritecollideany(sprite, group, collided=None): # <<<<<<<<<<<<<< @@ -24762,7 +25278,12 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_AbstractGroup = { sizeof(struct __pyx_obj_6pygame_7_sprite_AbstractGroup), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -24815,6 +25336,9 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_AbstractGroup = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_6pygame_7_sprite_Sprite __pyx_vtable_6pygame_7_sprite_Sprite; @@ -24967,7 +25491,12 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_Sprite = { sizeof(struct __pyx_obj_6pygame_7_sprite_Sprite), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_Sprite, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -25020,6 +25549,9 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_Sprite = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_6pygame_7_sprite_Group __pyx_vtable_6pygame_7_sprite_Group; @@ -25044,7 +25576,12 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_Group = { sizeof(struct __pyx_obj_6pygame_7_sprite_Group), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -25105,6 +25642,9 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_Group = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_6pygame_7_sprite_RenderUpdates __pyx_vtable_6pygame_7_sprite_RenderUpdates; @@ -25130,7 +25670,12 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_RenderUpdates = { sizeof(struct __pyx_obj_6pygame_7_sprite_RenderUpdates), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_AbstractGroup, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -25195,6 +25740,9 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_RenderUpdates = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_6pygame_7_sprite_OrderedUpdates __pyx_vtable_6pygame_7_sprite_OrderedUpdates; @@ -25274,7 +25822,12 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_OrderedUpdates = { sizeof(struct __pyx_obj_6pygame_7_sprite_OrderedUpdates), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_OrderedUpdates, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -25335,6 +25888,9 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_OrderedUpdates = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_6pygame_7_sprite_LayeredUpdates __pyx_vtable_6pygame_7_sprite_LayeredUpdates; @@ -25470,7 +26026,12 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_LayeredUpdates = { sizeof(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_LayeredUpdates, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -25531,6 +26092,9 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_LayeredUpdates = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_6pygame_7_sprite_LayeredDirty __pyx_vtable_6pygame_7_sprite_LayeredDirty; @@ -25667,7 +26231,12 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_LayeredDirty = { sizeof(struct __pyx_obj_6pygame_7_sprite_LayeredDirty), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_LayeredDirty, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -25728,6 +26297,9 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_LayeredDirty = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static struct __pyx_vtabstruct_6pygame_7_sprite_GroupSingle __pyx_vtable_6pygame_7_sprite_GroupSingle; @@ -25890,7 +26462,12 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_GroupSingle = { sizeof(struct __pyx_obj_6pygame_7_sprite_GroupSingle), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6pygame_7_sprite_GroupSingle, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 @@ -25951,6 +26528,9 @@ static PyTypeObject __pyx_type_6pygame_7_sprite_GroupSingle = { #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif }; static PyMethodDef __pyx_methods[] = { @@ -26176,10 +26756,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 302, __pyx_L1_error) - __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 1464, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) - __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 400, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -26284,14 +26864,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "pygame/_sprite.pyx":841 + /* "pygame/_sprite.pyx":843 * """ * _sprites = self._spritelist * rect = Rect(pos, (0, 0)) # <<<<<<<<<<<<<< * colliding_idx = rect.collidelistall(_sprites) * colliding = [_sprites[i] for i in colliding_idx] */ - __pyx_tuple__11 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_tuple__11 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); @@ -26352,195 +26932,195 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); - /* "pygame/_sprite.pyx":281 + /* "pygame/_sprite.pyx":283 * """ * * def __init__(self, *groups): # <<<<<<<<<<<<<< * * self.dirty = 1 */ - __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_groups); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 281, __pyx_L1_error) + __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_groups); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_init, 281, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 281, __pyx_L1_error) + __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_init, 283, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 283, __pyx_L1_error) - /* "pygame/_sprite.pyx":292 + /* "pygame/_sprite.pyx":294 * Sprite.__init__(self, *groups) * * def _set_visible(self, val): # <<<<<<<<<<<<<< * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val */ - __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_val); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_val); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_set_visible, 292, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_set_visible, 294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 294, __pyx_L1_error) - /* "pygame/_sprite.pyx":298 + /* "pygame/_sprite.pyx":300 * self.dirty = 1 * * def _get_visible(self): # <<<<<<<<<<<<<< * """return the visible value of that sprite""" * return self._visible */ - __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); - __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_visible, 298, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_get_visible, 300, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 300, __pyx_L1_error) - /* "pygame/_sprite.pyx":308 + /* "pygame/_sprite.pyx":310 * "assign 0 for invisible and 1 for visible") * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s DirtySprite(in %d groups)>" % \ * (self.__class__.__name__, len(self.groups())) */ - __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); - __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_repr, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_repr, 310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 310, __pyx_L1_error) - /* "pygame/_sprite.pyx":671 + /* "pygame/_sprite.pyx":673 * """ * * _init_rect = Rect(0, 0, 0, 0) # <<<<<<<<<<<<<< * * cdef public dict _spritelayers */ - __pyx_tuple__26 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 671, __pyx_L1_error) + __pyx_tuple__26 = PyTuple_Pack(4, __pyx_int_0, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); - /* "pygame/_sprite.pyx":1357 + /* "pygame/_sprite.pyx":1359 * * # Some different collision detection functions that could be used. * def collide_rect(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using rects. * */ - __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_left, __pyx_n_s_right); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1357, __pyx_L1_error) + __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_s_left, __pyx_n_s_right); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); - __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_collide_rect, 1357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 1357, __pyx_L1_error) + __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_collide_rect, 1359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 1359, __pyx_L1_error) - /* "pygame/_sprite.pyx":1384 + /* "pygame/_sprite.pyx":1386 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """create a new collide_rect_ratio callable * */ - __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ratio); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ratio); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); - __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_init, 1384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_init, 1386, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 1386, __pyx_L1_error) - /* "pygame/_sprite.pyx":1393 + /* "pygame/_sprite.pyx":1395 * self.ratio = ratio * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled rects * */ - __pyx_tuple__31 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_ratio, __pyx_n_s_leftrect, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_rightrect); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_tuple__31 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_ratio, __pyx_n_s_leftrect, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_rightrect); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 1395, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); - __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_call, 1393, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_call, 1395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 1395, __pyx_L1_error) - /* "pygame/_sprite.pyx":1420 + /* "pygame/_sprite.pyx":1422 * return leftrect.colliderect(rightrect) * * def collide_circle(left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using circles * */ - __pyx_tuple__33 = PyTuple_Pack(9, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_xdistance, __pyx_n_s_ydistance, __pyx_n_s_distancesquared, __pyx_n_s_leftradius, __pyx_n_s_leftrect, __pyx_n_s_rightradius, __pyx_n_s_rightrect); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_tuple__33 = PyTuple_Pack(9, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_xdistance, __pyx_n_s_ydistance, __pyx_n_s_distancesquared, __pyx_n_s_leftradius, __pyx_n_s_leftrect, __pyx_n_s_rightradius, __pyx_n_s_rightrect); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); - __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_collide_circle, 1420, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_collide_circle, 1422, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 1422, __pyx_L1_error) - /* "pygame/_sprite.pyx":1462 + /* "pygame/_sprite.pyx":1464 * return distancesquared <= (leftradius + rightradius) ** 2 * * class collide_circle_ratio(object): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ - __pyx_tuple__35 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_tuple__35 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); - /* "pygame/_sprite.pyx":1474 + /* "pygame/_sprite.pyx":1476 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """creates a new collide_circle_ratio callable instance * */ - __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ratio); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1474, __pyx_L1_error) + __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ratio); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); - __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_init, 1474, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1474, __pyx_L1_error) + __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_init, 1476, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 1476, __pyx_L1_error) - /* "pygame/_sprite.pyx":1487 + /* "pygame/_sprite.pyx":1489 * * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ - __pyx_tuple__38 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_ratio, __pyx_n_s_xdistance, __pyx_n_s_ydistance, __pyx_n_s_distancesquared, __pyx_n_s_leftradius, __pyx_n_s_leftrect, __pyx_n_s_rightradius, __pyx_n_s_rightrect); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1487, __pyx_L1_error) + __pyx_tuple__38 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_ratio, __pyx_n_s_xdistance, __pyx_n_s_ydistance, __pyx_n_s_distancesquared, __pyx_n_s_leftradius, __pyx_n_s_leftrect, __pyx_n_s_rightradius, __pyx_n_s_rightrect); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1489, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); - __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_call, 1487, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1487, __pyx_L1_error) + __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_call, 1489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 1489, __pyx_L1_error) - /* "pygame/_sprite.pyx":1526 + /* "pygame/_sprite.pyx":1528 * return distancesquared <= (leftradius + rightradius) ** 2 * * def collide_mask(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using masks. * */ - __pyx_tuple__40 = PyTuple_Pack(6, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_xoffset, __pyx_n_s_yoffset, __pyx_n_s_leftmask, __pyx_n_s_rightmask); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_tuple__40 = PyTuple_Pack(6, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_xoffset, __pyx_n_s_yoffset, __pyx_n_s_leftmask, __pyx_n_s_rightmask); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); - __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_collide_mask, 1526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_collide_mask, 1528, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 1528, __pyx_L1_error) - /* "pygame/_sprite.pyx":1552 + /* "pygame/_sprite.pyx":1554 * return leftmask.overlap(rightmask, (xoffset, yoffset)) * * def spritecollide(sprite, group, dokill, collided=None): # <<<<<<<<<<<<<< * """find Sprites in a Group that intersect another Sprite * */ - __pyx_tuple__42 = PyTuple_Pack(8, __pyx_n_s_sprite, __pyx_n_s_group, __pyx_n_s_dokill, __pyx_n_s_collided, __pyx_n_s_crashed, __pyx_n_s_append, __pyx_n_s_s, __pyx_n_s_spritecollide); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_tuple__42 = PyTuple_Pack(8, __pyx_n_s_sprite, __pyx_n_s_group, __pyx_n_s_dokill, __pyx_n_s_collided, __pyx_n_s_crashed, __pyx_n_s_append, __pyx_n_s_s, __pyx_n_s_spritecollide); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); - __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_spritecollide, 1552, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_spritecollide, 1554, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 1554, __pyx_L1_error) - /* "pygame/_sprite.pyx":1598 + /* "pygame/_sprite.pyx":1600 * * * def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): # <<<<<<<<<<<<<< * """detect collision between a group and another group * */ - __pyx_tuple__44 = PyTuple_Pack(9, __pyx_n_s_groupa, __pyx_n_s_groupb, __pyx_n_s_dokilla, __pyx_n_s_dokillb, __pyx_n_s_collided, __pyx_n_s_crashed, __pyx_n_s_SC, __pyx_n_s_s, __pyx_n_s_c); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1598, __pyx_L1_error) + __pyx_tuple__44 = PyTuple_Pack(9, __pyx_n_s_groupa, __pyx_n_s_groupb, __pyx_n_s_dokilla, __pyx_n_s_dokillb, __pyx_n_s_collided, __pyx_n_s_crashed, __pyx_n_s_SC, __pyx_n_s_s, __pyx_n_s_c); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); - __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_groupcollide, 1598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1598, __pyx_L1_error) + __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(5, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_groupcollide, 1600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 1600, __pyx_L1_error) - /* "pygame/_sprite.pyx":1631 + /* "pygame/_sprite.pyx":1633 * return crashed * * def spritecollideany(sprite, group, collided=None): # <<<<<<<<<<<<<< * """finds any sprites in a group that collide with the given sprite * */ - __pyx_tuple__46 = PyTuple_Pack(5, __pyx_n_s_sprite, __pyx_n_s_group, __pyx_n_s_collided, __pyx_n_s_s, __pyx_n_s_spritecollide); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1631, __pyx_L1_error) + __pyx_tuple__46 = PyTuple_Pack(5, __pyx_n_s_sprite, __pyx_n_s_group, __pyx_n_s_collided, __pyx_n_s_s, __pyx_n_s_spritecollide); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_spritecollideany, 1631, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 1631, __pyx_L1_error) + __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_c_cython_pygame__sprite_pyx, __pyx_n_s_spritecollideany, 1633, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 1633, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -26600,18 +27180,21 @@ static int __Pyx_modinit_function_export_code(void) { static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ - __pyx_t_1 = PyImport_ImportModule("pygame"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_1 = PyImport_ImportModule("pygame"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_6pygame_7_sprite_Rect = __Pyx_ImportType(__pyx_t_1, "pygame", "Rect", sizeof(pgRectObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6pygame_7_sprite_Rect) __PYX_ERR(0, 115, __pyx_L1_error) + if (!__pyx_ptype_6pygame_7_sprite_Rect) __PYX_ERR(0, 117, __pyx_L1_error) __pyx_vtabptr_6pygame_7_sprite_AbstractGroup = &__pyx_vtable_6pygame_7_sprite_AbstractGroup; __pyx_vtable_6pygame_7_sprite_AbstractGroup.sprites = (PyObject *(*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_13AbstractGroup_sprites; __pyx_vtable_6pygame_7_sprite_AbstractGroup.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_13AbstractGroup_add_internal; __pyx_vtable_6pygame_7_sprite_AbstractGroup.remove_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_13AbstractGroup_remove_internal; __pyx_vtable_6pygame_7_sprite_AbstractGroup.has_internal = (int (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_13AbstractGroup_has_internal; - if (PyType_Ready(&__pyx_type_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 313, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 315, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_7_sprite_AbstractGroup.tp_print = 0; #endif @@ -26620,7 +27203,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_7_sprite_AbstractGroup, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 313, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_7_sprite_AbstractGroup, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 315, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6pygame_7_sprite_13AbstractGroup_32__len__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_7_sprite_13AbstractGroup_32__len__.doc = __pyx_doc_6pygame_7_sprite_13AbstractGroup_32__len__; @@ -26628,48 +27211,48 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_AbstractGroup.tp_dict, __pyx_vtabptr_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 313, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractGroup, (PyObject *)&__pyx_type_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 313, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 313, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_AbstractGroup.tp_dict, __pyx_vtabptr_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 315, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbstractGroup, (PyObject *)&__pyx_type_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 315, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_AbstractGroup) < 0) __PYX_ERR(0, 315, __pyx_L1_error) __pyx_ptype_6pygame_7_sprite_AbstractGroup = &__pyx_type_6pygame_7_sprite_AbstractGroup; __pyx_vtabptr_6pygame_7_sprite_Sprite = &__pyx_vtable_6pygame_7_sprite_Sprite; __pyx_vtable_6pygame_7_sprite_Sprite.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_Sprite *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_6Sprite_add_internal; __pyx_vtable_6pygame_7_sprite_Sprite.remove_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_Sprite *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_6Sprite_remove_internal; - if (PyType_Ready(&__pyx_type_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 126, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 128, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_7_sprite_Sprite.tp_print = 0; #endif - if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_Sprite.tp_dict, __pyx_vtabptr_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 126, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Sprite, (PyObject *)&__pyx_type_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 126, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 126, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_Sprite.tp_dict, __pyx_vtabptr_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 128, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Sprite, (PyObject *)&__pyx_type_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 128, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_Sprite) < 0) __PYX_ERR(0, 128, __pyx_L1_error) __pyx_ptype_6pygame_7_sprite_Sprite = &__pyx_type_6pygame_7_sprite_Sprite; __pyx_vtabptr_6pygame_7_sprite_Group = &__pyx_vtable_6pygame_7_sprite_Group; __pyx_vtable_6pygame_7_sprite_Group.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_AbstractGroup; __pyx_type_6pygame_7_sprite_Group.tp_base = __pyx_ptype_6pygame_7_sprite_AbstractGroup; - if (PyType_Ready(&__pyx_type_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 576, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 578, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_7_sprite_Group.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pygame_7_sprite_Group.tp_dictoffset && __pyx_type_6pygame_7_sprite_Group.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6pygame_7_sprite_Group.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_Group.tp_dict, __pyx_vtabptr_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 576, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Group, (PyObject *)&__pyx_type_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 576, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 576, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_Group.tp_dict, __pyx_vtabptr_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 578, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Group, (PyObject *)&__pyx_type_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 578, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_Group) < 0) __PYX_ERR(0, 578, __pyx_L1_error) __pyx_ptype_6pygame_7_sprite_Group = &__pyx_type_6pygame_7_sprite_Group; __pyx_vtabptr_6pygame_7_sprite_RenderUpdates = &__pyx_vtable_6pygame_7_sprite_RenderUpdates; __pyx_vtable_6pygame_7_sprite_RenderUpdates.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_Group; __pyx_type_6pygame_7_sprite_RenderUpdates.tp_base = __pyx_ptype_6pygame_7_sprite_Group; - if (PyType_Ready(&__pyx_type_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 602, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 604, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_7_sprite_RenderUpdates.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pygame_7_sprite_RenderUpdates.tp_dictoffset && __pyx_type_6pygame_7_sprite_RenderUpdates.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6pygame_7_sprite_RenderUpdates.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_RenderUpdates.tp_dict, __pyx_vtabptr_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 602, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderUpdates, (PyObject *)&__pyx_type_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 602, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 602, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_RenderUpdates.tp_dict, __pyx_vtabptr_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 604, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RenderUpdates, (PyObject *)&__pyx_type_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 604, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_RenderUpdates) < 0) __PYX_ERR(0, 604, __pyx_L1_error) __pyx_ptype_6pygame_7_sprite_RenderUpdates = &__pyx_type_6pygame_7_sprite_RenderUpdates; __pyx_vtabptr_6pygame_7_sprite_OrderedUpdates = &__pyx_vtable_6pygame_7_sprite_OrderedUpdates; __pyx_vtable_6pygame_7_sprite_OrderedUpdates.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_RenderUpdates; @@ -26677,16 +27260,16 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_6pygame_7_sprite_OrderedUpdates.__pyx_base.__pyx_base.__pyx_base.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_14OrderedUpdates_add_internal; __pyx_vtable_6pygame_7_sprite_OrderedUpdates.__pyx_base.__pyx_base.__pyx_base.remove_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_14OrderedUpdates_remove_internal; __pyx_type_6pygame_7_sprite_OrderedUpdates.tp_base = __pyx_ptype_6pygame_7_sprite_RenderUpdates; - if (PyType_Ready(&__pyx_type_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 631, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 633, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_7_sprite_OrderedUpdates.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pygame_7_sprite_OrderedUpdates.tp_dictoffset && __pyx_type_6pygame_7_sprite_OrderedUpdates.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6pygame_7_sprite_OrderedUpdates.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_OrderedUpdates.tp_dict, __pyx_vtabptr_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 631, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OrderedUpdates, (PyObject *)&__pyx_type_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 631, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 631, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_OrderedUpdates.tp_dict, __pyx_vtabptr_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 633, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_OrderedUpdates, (PyObject *)&__pyx_type_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 633, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_OrderedUpdates) < 0) __PYX_ERR(0, 633, __pyx_L1_error) __pyx_ptype_6pygame_7_sprite_OrderedUpdates = &__pyx_type_6pygame_7_sprite_OrderedUpdates; __pyx_vtabptr_6pygame_7_sprite_LayeredUpdates = &__pyx_vtable_6pygame_7_sprite_LayeredUpdates; __pyx_vtable_6pygame_7_sprite_LayeredUpdates.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_AbstractGroup; @@ -26695,7 +27278,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_6pygame_7_sprite_LayeredUpdates.__pyx_base.remove_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_14LayeredUpdates_remove_internal; __pyx_vtable_6pygame_7_sprite_LayeredUpdates.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal *__pyx_optional_args))__pyx_f_6pygame_7_sprite_14LayeredUpdates_add_internal; __pyx_type_6pygame_7_sprite_LayeredUpdates.tp_base = __pyx_ptype_6pygame_7_sprite_AbstractGroup; - if (PyType_Ready(&__pyx_type_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 661, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 663, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_7_sprite_LayeredUpdates.tp_print = 0; #endif @@ -26704,7 +27287,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_7_sprite_LayeredUpdates, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 661, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_7_sprite_LayeredUpdates, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 663, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6pygame_7_sprite_14LayeredUpdates_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_7_sprite_14LayeredUpdates_2__init__.doc = __pyx_doc_6pygame_7_sprite_14LayeredUpdates_2__init__; @@ -26712,16 +27295,16 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_LayeredUpdates.tp_dict, __pyx_vtabptr_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 661, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LayeredUpdates, (PyObject *)&__pyx_type_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 661, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 661, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_LayeredUpdates.tp_dict, __pyx_vtabptr_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 663, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LayeredUpdates, (PyObject *)&__pyx_type_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 663, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_LayeredUpdates) < 0) __PYX_ERR(0, 663, __pyx_L1_error) __pyx_ptype_6pygame_7_sprite_LayeredUpdates = &__pyx_type_6pygame_7_sprite_LayeredUpdates; __pyx_vtabptr_6pygame_7_sprite_LayeredDirty = &__pyx_vtable_6pygame_7_sprite_LayeredDirty; __pyx_vtable_6pygame_7_sprite_LayeredDirty.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_LayeredUpdates; __pyx_vtable_6pygame_7_sprite_LayeredDirty.__pyx_base.__pyx_base.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal__pyx_wrap_1; __pyx_vtable_6pygame_7_sprite_LayeredDirty.__pyx_base.add_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_LayeredUpdates *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6pygame_7_sprite_14LayeredUpdates_add_internal *__pyx_optional_args))__pyx_f_6pygame_7_sprite_12LayeredDirty_add_internal; __pyx_type_6pygame_7_sprite_LayeredDirty.tp_base = __pyx_ptype_6pygame_7_sprite_LayeredUpdates; - if (PyType_Ready(&__pyx_type_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1002, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1004, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_7_sprite_LayeredDirty.tp_print = 0; #endif @@ -26730,7 +27313,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_7_sprite_LayeredDirty, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1002, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6pygame_7_sprite_LayeredDirty, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1004, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6pygame_7_sprite_12LayeredDirty___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6pygame_7_sprite_12LayeredDirty___init__.doc = __pyx_doc_6pygame_7_sprite_12LayeredDirty___init__; @@ -26738,9 +27321,9 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_LayeredDirty.tp_dict, __pyx_vtabptr_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1002, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LayeredDirty, (PyObject *)&__pyx_type_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1002, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1002, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_LayeredDirty.tp_dict, __pyx_vtabptr_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1004, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LayeredDirty, (PyObject *)&__pyx_type_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1004, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_LayeredDirty) < 0) __PYX_ERR(0, 1004, __pyx_L1_error) __pyx_ptype_6pygame_7_sprite_LayeredDirty = &__pyx_type_6pygame_7_sprite_LayeredDirty; __pyx_vtabptr_6pygame_7_sprite_GroupSingle = &__pyx_vtable_6pygame_7_sprite_GroupSingle; __pyx_vtable_6pygame_7_sprite_GroupSingle.__pyx_base = *__pyx_vtabptr_6pygame_7_sprite_AbstractGroup; @@ -26749,16 +27332,16 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_6pygame_7_sprite_GroupSingle.__pyx_base.remove_internal = (void (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_11GroupSingle_remove_internal; __pyx_vtable_6pygame_7_sprite_GroupSingle.__pyx_base.has_internal = (int (*)(struct __pyx_obj_6pygame_7_sprite_AbstractGroup *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pygame_7_sprite_11GroupSingle_has_internal; __pyx_type_6pygame_7_sprite_GroupSingle.tp_base = __pyx_ptype_6pygame_7_sprite_AbstractGroup; - if (PyType_Ready(&__pyx_type_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1291, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6pygame_7_sprite_GroupSingle.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6pygame_7_sprite_GroupSingle.tp_dictoffset && __pyx_type_6pygame_7_sprite_GroupSingle.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6pygame_7_sprite_GroupSingle.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_GroupSingle.tp_dict, __pyx_vtabptr_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1291, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GroupSingle, (PyObject *)&__pyx_type_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1291, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1291, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6pygame_7_sprite_GroupSingle.tp_dict, __pyx_vtabptr_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GroupSingle, (PyObject *)&__pyx_type_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6pygame_7_sprite_GroupSingle) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) __pyx_ptype_6pygame_7_sprite_GroupSingle = &__pyx_type_6pygame_7_sprite_GroupSingle; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); @@ -26773,6 +27356,9 @@ static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) @@ -26796,25 +27382,25 @@ static int __Pyx_modinit_type_import_code(void) { __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(4, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("pygame"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 346, __pyx_L1_error) + __pyx_t_1 = PyImport_ImportModule("pygame"); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_6pygame_5_sdl2_5video_Color = __Pyx_ImportType(__pyx_t_1, "pygame", "Color", sizeof(pgColorObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6pygame_5_sdl2_5video_Color) __PYX_ERR(5, 346, __pyx_L1_error) + if (!__pyx_ptype_6pygame_5_sdl2_5video_Color) __PYX_ERR(5, 371, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Rect = __Pyx_ImportType(__pyx_t_1, "pygame", "Rect", sizeof(pgRectObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6pygame_5_sdl2_5video_Rect) __PYX_ERR(5, 350, __pyx_L1_error) - __pyx_t_2 = PyImport_ImportModule("pygame._sdl2.video"); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 355, __pyx_L1_error) + if (!__pyx_ptype_6pygame_5_sdl2_5video_Rect) __PYX_ERR(5, 375, __pyx_L1_error) + __pyx_t_2 = PyImport_ImportModule("pygame._sdl2.video"); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6pygame_5_sdl2_5video_Window = __Pyx_ImportType(__pyx_t_2, "pygame._sdl2.video", "Window", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Window), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6pygame_5_sdl2_5video_Window) __PYX_ERR(5, 355, __pyx_L1_error) + if (!__pyx_ptype_6pygame_5_sdl2_5video_Window) __PYX_ERR(5, 380, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Renderer = __Pyx_ImportType(__pyx_t_2, "pygame._sdl2.video", "Renderer", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Renderer), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6pygame_5_sdl2_5video_Renderer) __PYX_ERR(5, 358, __pyx_L1_error) - __pyx_vtabptr_6pygame_5_sdl2_5video_Renderer = (struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer*)__Pyx_GetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_dict); if (unlikely(!__pyx_vtabptr_6pygame_5_sdl2_5video_Renderer)) __PYX_ERR(5, 358, __pyx_L1_error) + if (!__pyx_ptype_6pygame_5_sdl2_5video_Renderer) __PYX_ERR(5, 384, __pyx_L1_error) + __pyx_vtabptr_6pygame_5_sdl2_5video_Renderer = (struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Renderer*)__Pyx_GetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Renderer->tp_dict); if (unlikely(!__pyx_vtabptr_6pygame_5_sdl2_5video_Renderer)) __PYX_ERR(5, 384, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Texture = __Pyx_ImportType(__pyx_t_2, "pygame._sdl2.video", "Texture", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Texture), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6pygame_5_sdl2_5video_Texture) __PYX_ERR(5, 367, __pyx_L1_error) - __pyx_vtabptr_6pygame_5_sdl2_5video_Texture = (struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture*)__Pyx_GetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Texture->tp_dict); if (unlikely(!__pyx_vtabptr_6pygame_5_sdl2_5video_Texture)) __PYX_ERR(5, 367, __pyx_L1_error) + if (!__pyx_ptype_6pygame_5_sdl2_5video_Texture) __PYX_ERR(5, 394, __pyx_L1_error) + __pyx_vtabptr_6pygame_5_sdl2_5video_Texture = (struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Texture*)__Pyx_GetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Texture->tp_dict); if (unlikely(!__pyx_vtabptr_6pygame_5_sdl2_5video_Texture)) __PYX_ERR(5, 394, __pyx_L1_error) __pyx_ptype_6pygame_5_sdl2_5video_Image = __Pyx_ImportType(__pyx_t_2, "pygame._sdl2.video", "Image", sizeof(struct __pyx_obj_6pygame_5_sdl2_5video_Image), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6pygame_5_sdl2_5video_Image) __PYX_ERR(5, 379, __pyx_L1_error) - __pyx_vtabptr_6pygame_5_sdl2_5video_Image = (struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image*)__Pyx_GetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Image->tp_dict); if (unlikely(!__pyx_vtabptr_6pygame_5_sdl2_5video_Image)) __PYX_ERR(5, 379, __pyx_L1_error) + if (!__pyx_ptype_6pygame_5_sdl2_5video_Image) __PYX_ERR(5, 406, __pyx_L1_error) + __pyx_vtabptr_6pygame_5_sdl2_5video_Image = (struct __pyx_vtabstruct_6pygame_5_sdl2_5video_Image*)__Pyx_GetVtable(__pyx_ptype_6pygame_5_sdl2_5video_Image->tp_dict); if (unlikely(!__pyx_vtabptr_6pygame_5_sdl2_5video_Image)) __PYX_ERR(5, 406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_RefNannyFinishContext(); @@ -26843,17 +27429,19 @@ static int __Pyx_modinit_function_import_code(void) { } -#if PY_MAJOR_VERSION < 3 -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC void -#else +#ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void #endif #else -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyObject * +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif @@ -26945,6 +27533,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__sprite(PyObject *__pyx_pyinit_mod PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { @@ -26992,11 +27583,9 @@ if (!__Pyx_RefNanny) { #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ - #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - #ifdef WITH_THREAD /* Python build with threading support? */ + #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS PyEval_InitThreads(); #endif - #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; @@ -27033,15 +27622,15 @@ if (!__Pyx_RefNanny) { } #endif /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); - if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; - if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; + if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ @@ -27049,107 +27638,107 @@ if (!__Pyx_RefNanny) { if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif - /* "pygame/_sprite.pyx":89 + /* "pygame/_sprite.pyx":91 * ## specialized cases. * * import pygame # <<<<<<<<<<<<<< * from pygame import Rect * from pygame.time import get_ticks */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_pygame, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pygame, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pygame, __pyx_t_1) < 0) __PYX_ERR(0, 89, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pygame, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":90 + /* "pygame/_sprite.pyx":92 * * import pygame * from pygame import Rect # <<<<<<<<<<<<<< * from pygame.time import get_ticks * from operator import truth */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Rect); __Pyx_GIVEREF(__pyx_n_s_Rect); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Rect); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pygame, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pygame, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":91 + /* "pygame/_sprite.pyx":93 * import pygame * from pygame import Rect * from pygame.time import get_ticks # <<<<<<<<<<<<<< * from operator import truth * */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_get_ticks); __Pyx_GIVEREF(__pyx_n_s_get_ticks); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_ticks); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_pygame_time, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pygame_time, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_get_ticks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_get_ticks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_ticks, __pyx_t_2) < 0) __PYX_ERR(0, 91, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_ticks, __pyx_t_2) < 0) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":92 + /* "pygame/_sprite.pyx":94 * from pygame import Rect * from pygame.time import get_ticks * from operator import truth # <<<<<<<<<<<<<< * * from cpython cimport PyObject_CallFunctionObjArgs, PyDict_SetItem, \ */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_truth); __Pyx_GIVEREF(__pyx_n_s_truth); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_truth); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_operator, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_operator, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_truth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_truth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_truth, __pyx_t_1) < 0) __PYX_ERR(0, 92, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_truth, __pyx_t_1) < 0) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":99 + /* "pygame/_sprite.pyx":101 * # Python 3 does not have the callable function, but an equivalent can be made * # with the hasattr function. * if 'callable' not in dir(__builtins__): # <<<<<<<<<<<<<< * callable = lambda obj: hasattr(obj, '__call__') * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_builtins); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_builtins); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_Dir(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_1 = PyObject_Dir(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_callable, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_callable, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "pygame/_sprite.pyx":100 + /* "pygame/_sprite.pyx":102 * # with the hasattr function. * if 'callable' not in dir(__builtins__): * callable = lambda obj: hasattr(obj, '__call__') # <<<<<<<<<<<<<< * * # Don't depend on pygame.mask if it's not there... */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_12lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_pygame__sprite, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_12lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_pygame__sprite, __pyx_d, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_callable, __pyx_t_1) < 0) __PYX_ERR(0, 100, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_callable, __pyx_t_1) < 0) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":99 + /* "pygame/_sprite.pyx":101 * # Python 3 does not have the callable function, but an equivalent can be made * # with the hasattr function. * if 'callable' not in dir(__builtins__): # <<<<<<<<<<<<<< @@ -27158,7 +27747,7 @@ if (!__Pyx_RefNanny) { */ } - /* "pygame/_sprite.pyx":103 + /* "pygame/_sprite.pyx":105 * * # Don't depend on pygame.mask if it's not there... * try: # <<<<<<<<<<<<<< @@ -27174,28 +27763,28 @@ if (!__Pyx_RefNanny) { __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "pygame/_sprite.pyx":104 + /* "pygame/_sprite.pyx":106 * # Don't depend on pygame.mask if it's not there... * try: * from pygame.mask import from_surface # <<<<<<<<<<<<<< * except: * pass */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L3_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_from_surface); __Pyx_GIVEREF(__pyx_n_s_from_surface); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_from_surface); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pygame_mask, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L3_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pygame_mask, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L3_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_from_surface); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_from_surface, __pyx_t_1) < 0) __PYX_ERR(0, 104, __pyx_L3_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_from_surface, __pyx_t_1) < 0) __PYX_ERR(0, 106, __pyx_L3_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":103 + /* "pygame/_sprite.pyx":105 * * # Don't depend on pygame.mask if it's not there... * try: # <<<<<<<<<<<<<< @@ -27211,7 +27800,7 @@ if (!__Pyx_RefNanny) { __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":105 + /* "pygame/_sprite.pyx":107 * try: * from pygame.mask import from_surface * except: # <<<<<<<<<<<<<< @@ -27230,87 +27819,87 @@ if (!__Pyx_RefNanny) { __pyx_L8_try_end:; } - /* "pygame/_sprite.pyx":249 + /* "pygame/_sprite.pyx":251 * * * class DirtySprite(Sprite): # <<<<<<<<<<<<<< * """a more featureful subclass of Sprite with more attributes * */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6pygame_7_sprite_Sprite)); - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DirtySprite, __pyx_n_s_DirtySprite, (PyObject *) NULL, __pyx_n_s_pygame__sprite, __pyx_kp_s_a_more_featureful_subclass_of_Sp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_DirtySprite, __pyx_n_s_DirtySprite, (PyObject *) NULL, __pyx_n_s_pygame__sprite, __pyx_kp_s_a_more_featureful_subclass_of_Sp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - /* "pygame/_sprite.pyx":281 + /* "pygame/_sprite.pyx":283 * """ * * def __init__(self, *groups): # <<<<<<<<<<<<<< * * self.dirty = 1 */ - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_1__init__, 0, __pyx_n_s_DirtySprite___init, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 281, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_1__init__, 0, __pyx_n_s_DirtySprite___init, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_init, __pyx_t_9) < 0) __PYX_ERR(0, 281, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_init, __pyx_t_9) < 0) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pygame/_sprite.pyx":292 + /* "pygame/_sprite.pyx":294 * Sprite.__init__(self, *groups) * * def _set_visible(self, val): # <<<<<<<<<<<<<< * """set the visible value (0 or 1) and makes the sprite dirty""" * self._visible = val */ - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_3_set_visible, 0, __pyx_n_s_DirtySprite__set_visible, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_3_set_visible, 0, __pyx_n_s_DirtySprite__set_visible, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_set_visible, __pyx_t_9) < 0) __PYX_ERR(0, 292, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_set_visible, __pyx_t_9) < 0) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pygame/_sprite.pyx":298 + /* "pygame/_sprite.pyx":300 * self.dirty = 1 * * def _get_visible(self): # <<<<<<<<<<<<<< * """return the visible value of that sprite""" * return self._visible */ - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_5_get_visible, 0, __pyx_n_s_DirtySprite__get_visible, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_5_get_visible, 0, __pyx_n_s_DirtySprite__get_visible, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_get_visible, __pyx_t_9) < 0) __PYX_ERR(0, 298, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_get_visible, __pyx_t_9) < 0) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pygame/_sprite.pyx":302 + /* "pygame/_sprite.pyx":304 * return self._visible * * visible = property(lambda self: self._get_visible(), # <<<<<<<<<<<<<< * lambda self, value: self._set_visible(value), * doc="you can make this sprite disappear without " */ - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_8lambda1, 0, __pyx_n_s_DirtySprite_lambda, NULL, __pyx_n_s_pygame__sprite, __pyx_d, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_8lambda1, 0, __pyx_n_s_DirtySprite_lambda, NULL, __pyx_n_s_pygame__sprite, __pyx_d, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "pygame/_sprite.pyx":303 + /* "pygame/_sprite.pyx":305 * * visible = property(lambda self: self._get_visible(), * lambda self, value: self._set_visible(value), # <<<<<<<<<<<<<< * doc="you can make this sprite disappear without " * "removing it from the group,\n" */ - __pyx_t_10 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_9lambda2, 0, __pyx_n_s_DirtySprite_lambda, NULL, __pyx_n_s_pygame__sprite, __pyx_d, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_9lambda2, 0, __pyx_n_s_DirtySprite_lambda, NULL, __pyx_n_s_pygame__sprite, __pyx_d, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - /* "pygame/_sprite.pyx":302 + /* "pygame/_sprite.pyx":304 * return self._visible * * visible = property(lambda self: self._get_visible(), # <<<<<<<<<<<<<< * lambda self, value: self._set_visible(value), * doc="you can make this sprite disappear without " */ - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); @@ -27319,127 +27908,127 @@ if (!__Pyx_RefNanny) { __pyx_t_9 = 0; __pyx_t_10 = 0; - /* "pygame/_sprite.pyx":304 + /* "pygame/_sprite.pyx":306 * visible = property(lambda self: self._get_visible(), * lambda self, value: self._set_visible(value), * doc="you can make this sprite disappear without " # <<<<<<<<<<<<<< * "removing it from the group,\n" * "assign 0 for invisible and 1 for visible") */ - __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_doc, __pyx_kp_s_you_can_make_this_sprite_disappe) < 0) __PYX_ERR(0, 304, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_doc, __pyx_kp_s_you_can_make_this_sprite_disappe) < 0) __PYX_ERR(0, 306, __pyx_L1_error) - /* "pygame/_sprite.pyx":302 + /* "pygame/_sprite.pyx":304 * return self._visible * * visible = property(lambda self: self._get_visible(), # <<<<<<<<<<<<<< * lambda self, value: self._set_visible(value), * doc="you can make this sprite disappear without " */ - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_visible_2, __pyx_t_9) < 0) __PYX_ERR(0, 302, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_visible_2, __pyx_t_9) < 0) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pygame/_sprite.pyx":308 + /* "pygame/_sprite.pyx":310 * "assign 0 for invisible and 1 for visible") * * def __repr__(self): # <<<<<<<<<<<<<< * return "<%s DirtySprite(in %d groups)>" % \ * (self.__class__.__name__, len(self.groups())) */ - __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_7__repr__, 0, __pyx_n_s_DirtySprite___repr, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_11DirtySprite_7__repr__, 0, __pyx_n_s_DirtySprite___repr, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_repr, __pyx_t_9) < 0) __PYX_ERR(0, 308, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_repr, __pyx_t_9) < 0) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "pygame/_sprite.pyx":249 + /* "pygame/_sprite.pyx":251 * * * class DirtySprite(Sprite): # <<<<<<<<<<<<<< * """a more featureful subclass of Sprite with more attributes * */ - __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DirtySprite, __pyx_t_2, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_DirtySprite, __pyx_t_2, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DirtySprite, __pyx_t_9) < 0) __PYX_ERR(0, 249, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DirtySprite, __pyx_t_9) < 0) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":326 + /* "pygame/_sprite.pyx":328 * * # dummy val to identify sprite groups, and avoid infinite recursion * _spritegroup = True # <<<<<<<<<<<<<< * * cdef public dict spritedict */ - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup->tp_dict, __pyx_n_s_spritegroup, Py_True) < 0) __PYX_ERR(0, 326, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_7_sprite_AbstractGroup->tp_dict, __pyx_n_s_spritegroup, Py_True) < 0) __PYX_ERR(0, 328, __pyx_L1_error) PyType_Modified(__pyx_ptype_6pygame_7_sprite_AbstractGroup); - /* "pygame/_sprite.pyx":599 + /* "pygame/_sprite.pyx":601 * self.add(*sprites) * * RenderPlain = Group # <<<<<<<<<<<<<< * RenderClear = Group * */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RenderPlain, ((PyObject *)__pyx_ptype_6pygame_7_sprite_Group)) < 0) __PYX_ERR(0, 599, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RenderPlain, ((PyObject *)__pyx_ptype_6pygame_7_sprite_Group)) < 0) __PYX_ERR(0, 601, __pyx_L1_error) - /* "pygame/_sprite.pyx":600 + /* "pygame/_sprite.pyx":602 * * RenderPlain = Group * RenderClear = Group # <<<<<<<<<<<<<< * * cdef class RenderUpdates(Group): */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RenderClear, ((PyObject *)__pyx_ptype_6pygame_7_sprite_Group)) < 0) __PYX_ERR(0, 600, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RenderClear, ((PyObject *)__pyx_ptype_6pygame_7_sprite_Group)) < 0) __PYX_ERR(0, 602, __pyx_L1_error) - /* "pygame/_sprite.pyx":671 + /* "pygame/_sprite.pyx":673 * """ * * _init_rect = Rect(0, 0, 0, 0) # <<<<<<<<<<<<<< * * cdef public dict _spritelayers */ - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect), __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6pygame_5_sdl2_5video_Rect), __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates->tp_dict, __pyx_n_s_init_rect, __pyx_t_2) < 0) __PYX_ERR(0, 671, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_7_sprite_LayeredUpdates->tp_dict, __pyx_n_s_init_rect, __pyx_t_2) < 0) __PYX_ERR(0, 673, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_LayeredUpdates); - /* "pygame/_sprite.pyx":1337 + /* "pygame/_sprite.pyx":1339 * return sprite * * sprite = property(_get_sprite, # <<<<<<<<<<<<<< * _set_sprite, * None, */ - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_get_sprite); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1337, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_get_sprite); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "pygame/_sprite.pyx":1338 + /* "pygame/_sprite.pyx":1340 * * sprite = property(_get_sprite, * _set_sprite, # <<<<<<<<<<<<<< * None, * "The sprite contained in this group") */ - __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_set_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle, __pyx_n_s_set_sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "pygame/_sprite.pyx":1337 + /* "pygame/_sprite.pyx":1339 * return sprite * * sprite = property(_get_sprite, # <<<<<<<<<<<<<< * _set_sprite, * None, */ - __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); @@ -27453,180 +28042,180 @@ if (!__Pyx_RefNanny) { PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_kp_s_The_sprite_contained_in_this_gro); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle->tp_dict, __pyx_n_s_sprite, __pyx_t_1) < 0) __PYX_ERR(0, 1337, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_6pygame_7_sprite_GroupSingle->tp_dict, __pyx_n_s_sprite, __pyx_t_1) < 0) __PYX_ERR(0, 1339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6pygame_7_sprite_GroupSingle); - /* "pygame/_sprite.pyx":1357 + /* "pygame/_sprite.pyx":1359 * * # Some different collision detection functions that could be used. * def collide_rect(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using rects. * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_1collide_rect, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_1collide_rect, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_rect, __pyx_t_1) < 0) __PYX_ERR(0, 1357, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_rect, __pyx_t_1) < 0) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1372 + /* "pygame/_sprite.pyx":1374 * return left.rect.colliderect(right.rect) * * class collide_rect_ratio: # <<<<<<<<<<<<<< * """A callable class that checks for collisions using scaled rects * */ - __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_collide_rect_ratio, __pyx_n_s_collide_rect_ratio, (PyObject *) NULL, __pyx_n_s_pygame__sprite, __pyx_kp_s_A_callable_class_that_checks_for); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_collide_rect_ratio, __pyx_n_s_collide_rect_ratio, (PyObject *) NULL, __pyx_n_s_pygame__sprite, __pyx_kp_s_A_callable_class_that_checks_for); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "pygame/_sprite.pyx":1384 + /* "pygame/_sprite.pyx":1386 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """create a new collide_rect_ratio callable * */ - __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_18collide_rect_ratio_1__init__, 0, __pyx_n_s_collide_rect_ratio___init, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_18collide_rect_ratio_1__init__, 0, __pyx_n_s_collide_rect_ratio___init, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 1384, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_8) < 0) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "pygame/_sprite.pyx":1393 + /* "pygame/_sprite.pyx":1395 * self.ratio = ratio * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled rects * */ - __pyx_t_8 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_18collide_rect_ratio_3__call__, 0, __pyx_n_s_collide_rect_ratio___call, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_18collide_rect_ratio_3__call__, 0, __pyx_n_s_collide_rect_ratio___call, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_call, __pyx_t_8) < 0) __PYX_ERR(0, 1393, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_call, __pyx_t_8) < 0) __PYX_ERR(0, 1395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "pygame/_sprite.pyx":1372 + /* "pygame/_sprite.pyx":1374 * return left.rect.colliderect(right.rect) * * class collide_rect_ratio: # <<<<<<<<<<<<<< * """A callable class that checks for collisions using scaled rects * */ - __pyx_t_8 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_collide_rect_ratio, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1372, __pyx_L1_error) + __pyx_t_8 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_collide_rect_ratio, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_rect_ratio, __pyx_t_8) < 0) __PYX_ERR(0, 1372, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_rect_ratio, __pyx_t_8) < 0) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1420 + /* "pygame/_sprite.pyx":1422 * return leftrect.colliderect(rightrect) * * def collide_circle(left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using circles * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_3collide_circle, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_3collide_circle, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_circle, __pyx_t_1) < 0) __PYX_ERR(0, 1420, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_circle, __pyx_t_1) < 0) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1462 + /* "pygame/_sprite.pyx":1464 * return distancesquared <= (leftradius + rightradius) ** 2 * * class collide_circle_ratio(object): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__35); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__35); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__35, __pyx_n_s_collide_circle_ratio, __pyx_n_s_collide_circle_ratio, (PyObject *) NULL, __pyx_n_s_pygame__sprite, __pyx_kp_s_detect_collision_between_two_spr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__35, __pyx_n_s_collide_circle_ratio, __pyx_n_s_collide_circle_ratio, (PyObject *) NULL, __pyx_n_s_pygame__sprite, __pyx_kp_s_detect_collision_between_two_spr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - /* "pygame/_sprite.pyx":1474 + /* "pygame/_sprite.pyx":1476 * """ * * def __init__(self, ratio): # <<<<<<<<<<<<<< * """creates a new collide_circle_ratio callable instance * */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_20collide_circle_ratio_1__init__, 0, __pyx_n_s_collide_circle_ratio___init, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1474, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_20collide_circle_ratio_1__init__, 0, __pyx_n_s_collide_circle_ratio___init, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 1474, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 1476, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1487 + /* "pygame/_sprite.pyx":1489 * * * def __call__(self, left, right): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_20collide_circle_ratio_3__call__, 0, __pyx_n_s_collide_circle_ratio___call, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1487, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6pygame_7_sprite_20collide_circle_ratio_3__call__, 0, __pyx_n_s_collide_circle_ratio___call, NULL, __pyx_n_s_pygame__sprite, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_call, __pyx_t_2) < 0) __PYX_ERR(0, 1487, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_n_s_call, __pyx_t_2) < 0) __PYX_ERR(0, 1489, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "pygame/_sprite.pyx":1462 + /* "pygame/_sprite.pyx":1464 * return distancesquared <= (leftradius + rightradius) ** 2 * * class collide_circle_ratio(object): # <<<<<<<<<<<<<< * """detect collision between two sprites using scaled circles * */ - __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_collide_circle_ratio, __pyx_tuple__35, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_collide_circle_ratio, __pyx_tuple__35, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_circle_ratio, __pyx_t_2) < 0) __PYX_ERR(0, 1462, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_circle_ratio, __pyx_t_2) < 0) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1526 + /* "pygame/_sprite.pyx":1528 * return distancesquared <= (leftradius + rightradius) ** 2 * * def collide_mask(left, right): # <<<<<<<<<<<<<< * """collision detection between two sprites, using masks. * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_5collide_mask, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_5collide_mask, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_mask, __pyx_t_1) < 0) __PYX_ERR(0, 1526, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_collide_mask, __pyx_t_1) < 0) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1552 + /* "pygame/_sprite.pyx":1554 * return leftmask.overlap(rightmask, (xoffset, yoffset)) * * def spritecollide(sprite, group, dokill, collided=None): # <<<<<<<<<<<<<< * """find Sprites in a Group that intersect another Sprite * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_7spritecollide, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_7spritecollide, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_spritecollide, __pyx_t_1) < 0) __PYX_ERR(0, 1552, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_spritecollide, __pyx_t_1) < 0) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1598 + /* "pygame/_sprite.pyx":1600 * * * def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): # <<<<<<<<<<<<<< * """detect collision between a group and another group * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_9groupcollide, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_9groupcollide, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupcollide, __pyx_t_1) < 0) __PYX_ERR(0, 1598, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_groupcollide, __pyx_t_1) < 0) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "pygame/_sprite.pyx":1631 + /* "pygame/_sprite.pyx":1633 * return crashed * * def spritecollideany(sprite, group, collided=None): # <<<<<<<<<<<<<< * """finds any sprites in a group that collide with the given sprite * */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_11spritecollideany, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pygame_7_sprite_11spritecollideany, NULL, __pyx_n_s_pygame__sprite); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_spritecollideany, __pyx_t_1) < 0) __PYX_ERR(0, 1631, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_spritecollideany, __pyx_t_1) < 0) __PYX_ERR(0, 1633, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pygame/_sprite.pyx":1 @@ -27815,7 +28404,7 @@ static int __Pyx_CheckKeywordStrings( #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; - ternaryfunc call = func->ob_type->tp_call; + ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) @@ -28044,7 +28633,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); #if CYTHON_FAST_PYCCALL - } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { + } else if (__Pyx_PyFastCFunction_Check(func)) { return __Pyx_PyCFunction_FastCall(func, &arg, 1); #endif } @@ -28772,7 +29361,7 @@ static int __Pyx_ParseOptionalKeywords( } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 - if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { @@ -28799,7 +29388,7 @@ static int __Pyx_ParseOptionalKeywords( while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -28815,7 +29404,7 @@ static int __Pyx_ParseOptionalKeywords( while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -30216,6 +30805,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { return -1; } +/* PyObjectGetAttrStrNoError */ +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +} + /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; @@ -30243,43 +30854,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { PyObject *setstate = NULL; PyObject *setstate_cython = NULL; #if CYTHON_USE_PYTYPE_LOOKUP - if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #else - if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #endif #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else - object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif - reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else - object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif - reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { - reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { - setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } } PyType_Modified((PyTypeObject*)type_obj); } } - goto GOOD; -BAD: + goto __PYX_GOOD; +__PYX_BAD: if (!PyErr_Occurred()) PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); ret = -1; -GOOD: +__PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); @@ -30342,7 +30961,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { { #if PY_MAJOR_VERSION >= 3 if (level == -1) { - if (strchr(__Pyx_MODULE_NAME, '.')) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { @@ -30430,7 +31049,7 @@ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { goto done; } -/* CythonFunction */ +/* CythonFunctionShared */ #include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) @@ -30723,7 +31342,8 @@ static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 - return PyUnicode_FromString(m->func.m_ml->ml_name); + Py_INCREF(m->func_qualname); + return m->func_qualname; #else return PyString_FromString(m->func.m_ml->ml_name); #endif @@ -30737,10 +31357,9 @@ static PyMethodDef __pyx_CyFunction_methods[] = { #else #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) #endif -static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); - if (op == NULL) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + if (unlikely(op == NULL)) return NULL; op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; @@ -30761,12 +31380,12 @@ static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int f Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; + op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; - PyObject_GC_Track(op); return (PyObject *) op; } static int @@ -30829,6 +31448,7 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { +#if PY_MAJOR_VERSION < 3 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); @@ -30841,6 +31461,7 @@ static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObj } if (obj == Py_None) obj = NULL; +#endif return __Pyx_PyMethod_New(func, obj, type); } static PyObject* @@ -30996,6 +31617,9 @@ static PyTypeObject __pyx_CyFunctionType_type = { #if PY_VERSION_HEX >= 0x030800b1 0, #endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, +#endif }; static int __pyx_CyFunction_init(void) { __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); @@ -31011,6 +31635,7 @@ static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; + m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { @@ -31029,6 +31654,19 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, Py Py_INCREF(dict); } +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + /* CalculateMetaclass */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); @@ -31157,7 +31795,7 @@ static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -31261,7 +31899,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } @@ -31384,71 +32022,16 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, return (target_type) value;\ } -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(int) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(int) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(int) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(int), - little, !is_unsigned); - } -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } -} - /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -31635,9 +32218,92 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { return (int) -1; } +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { diff --git a/src_c/cython/pygame/_sdl2/controller.pyx b/src_c/cython/pygame/_sdl2/controller.pyx index ba5c31c35b..3de4454d99 100644 --- a/src_c/cython/pygame/_sdl2/controller.pyx +++ b/src_c/cython/pygame/_sdl2/controller.pyx @@ -9,6 +9,7 @@ cdef extern from "pygame.h" nogil: cdef extern from "SDL.h" nogil: void SDL_free(void *mem) + int SDL_VERSION_ATLEAST(int major, int minor, int patch) import_pygame_joystick() @@ -245,6 +246,9 @@ cdef class Controller: False otherwise. """ self._CLOSEDCHECK() + if not SDL_VERSION_ATLEAST(2, 0, 9): + return False + duration = max(duration, 0) low = min(max(low_frequency, 0.0), 1.0) high = min(max(high_frequency, 0.0), 1.0) @@ -257,4 +261,5 @@ cdef class Controller: Stop any rumble effect playing on the controller. """ self._CLOSEDCHECK() - SDL_GameControllerRumble(self._controller, 0, 0, 1) + if SDL_VERSION_ATLEAST(2, 0, 9): + SDL_GameControllerRumble(self._controller, 0, 0, 1) diff --git a/src_c/pgcompat.c b/src_c/pgcompat.c index c2cbc00e26..7f109845c8 100644 --- a/src_c/pgcompat.c +++ b/src_c/pgcompat.c @@ -44,15 +44,4 @@ SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, } #endif /*if !(SDL_VERSION_ATLEAST(2, 0, 5))*/ -#if !(SDL_VERSION_ATLEAST(2, 0, 9)) -int -SDL_GameControllerRumble(SDL_GameController *gamecontroller, - Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, - Uint32 duration_ms) -{ - /*https://wiki.libsdl.org/SDL_GameControllerRumble*/ - return -1; -} - -#endif #endif /*if defined(SDL_VERSION_ATLEAST)*/ diff --git a/src_c/pgcompat.h b/src_c/pgcompat.h index cc06398176..74139b967a 100644 --- a/src_c/pgcompat.h +++ b/src_c/pgcompat.h @@ -194,11 +194,6 @@ int SDL_SetWindowInputFocus(SDL_Window *window); SDL_Surface * SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, Uint32 format); #endif -#if (SDL_VERSION_ATLEAST(2, 0, 0)) && !(SDL_VERSION_ATLEAST(2, 0, 9)) -int SDL_GameControllerRumble(SDL_GameController *gamecontroller, - Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, - Uint32 duration_ms); -#endif #endif /* defined(SDL_VERSION_ATLEAST) */ // Currently needed to build scrap.c, event.c, display.c