Specify python3.8-embed pkg-config and remove functions no longer in python 3.8
parent
8c7eedeae7
commit
cccfd203f8
|
@ -8,7 +8,7 @@ Copyright 2018 Datadog, Inc.
|
|||
package python3
|
||||
|
||||
/*
|
||||
#cgo pkg-config: python3
|
||||
#cgo pkg-config: python-3.8-embed
|
||||
#include "Python.h"
|
||||
*/
|
||||
import "C"
|
||||
|
|
|
@ -48,11 +48,6 @@ func PyThreadState_Swap(tstate *PyThreadState) *PyThreadState {
|
|||
return (*PyThreadState)(C.PyThreadState_Swap((*C.PyThreadState)(tstate)))
|
||||
}
|
||||
|
||||
//PyEval_ReInitThreads : https://docs.python.org/3/c-api/init.html#c.PyEval_ReInitThreads
|
||||
func PyEval_ReInitThreads() {
|
||||
C.PyEval_ReInitThreads()
|
||||
}
|
||||
|
||||
//PyGILState_Ensure : https://docs.python.org/3/c-api/init.html#c.PyGILState_Ensure
|
||||
func PyGILState_Ensure() PyGILState {
|
||||
return PyGILState(C.PyGILState_Ensure())
|
||||
|
|
|
@ -6,15 +6,6 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestThreadInitialization(t *testing.T) {
|
||||
Py_Initialize()
|
||||
PyEval_InitThreads()
|
||||
|
||||
assert.True(t, PyEval_ThreadsInitialized())
|
||||
|
||||
PyEval_ReInitThreads()
|
||||
}
|
||||
|
||||
func TestGIL(t *testing.T) {
|
||||
Py_Initialize()
|
||||
PyEval_InitThreads()
|
||||
|
|
Loading…
Reference in New Issue