forked from DataDog/go-python3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelper.go
More file actions
34 lines (27 loc) · 785 Bytes
/
Copy pathhelper.go
File metadata and controls
34 lines (27 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
Unless explicitly stated otherwise all files in this repository are licensed
under the MIT License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2018 Datadog, Inc.
*/
package python3
//go:generate go run script/variadic.go
/*
#include "Python.h"
#include "frameobject.h"
*/
import "C"
//togo converts a *C.PyObject to a *PyObject
func togo(cobject *C.PyObject) *PyObject {
return (*PyObject)(cobject)
}
func toc(object *PyObject) *C.PyObject {
return (*C.PyObject)(object)
}
//framectogo converts a *C.PyFrameObject to a *PyFrameObject
func framectogo(cobject *C.PyFrameObject) *PyFrameObject {
return (*PyFrameObject)(cobject)
}
func framegotoc(object *PyFrameObject) *C.PyFrameObject {
return (*C.PyFrameObject)(object)
}