From ed8dfba4f0c9e45616e9143a945d59d0da3e2a4e Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Tue, 25 Jul 2023 17:35:05 +0900 Subject: [PATCH] Update fibonacci.pyx ``` Error compiling Cython file: ------------------------------------------------------------ ... def fibonacci(unsigned int n): """ Return nth Fibonacci sequence number computed recursively """ with nogil: result = fibonacci_cc(n) ^ ------------------------------------------------------------ fibonacci.pyx:17:29: Calling gil-requiring function not allowed without gil ``` --- Chapter 9/05 - Cython as a language/fibonacci.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapter 9/05 - Cython as a language/fibonacci.pyx b/Chapter 9/05 - Cython as a language/fibonacci.pyx index ffbadf7..b352a00 100644 --- a/Chapter 9/05 - Cython as a language/fibonacci.pyx +++ b/Chapter 9/05 - Cython as a language/fibonacci.pyx @@ -1,7 +1,7 @@ """Cython module that provides fibonacci sequence function.""" -cdef long long fibonacci_cc(unsigned int n): +cdef long long fibonacci_cc(unsigned int n) nogil: if n == 0: return 0 if n == 1: