Skip to content

Commit

Permalink
Remove wrong C call _go_PyType_GetName
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatthm committed Feb 19, 2024
1 parent 41750c3 commit 01b6391
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

retract (
v3.11.0 // Invalid module name.
)
4 changes: 0 additions & 4 deletions macro.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ int _go_PyType_CheckExact(PyObject *o) {
return PyType_CheckExact(o);
}

int _go_PyType_GetName(PyTypeObject *t) {
return PyType_GetName(t);
}

int _go_PyLong_Check(PyObject *p) {
return PyLong_Check(p);
}
Expand Down
1 change: 0 additions & 1 deletion macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ void _go_Py_LeaveRecursiveCall();

int _go_PyType_Check(PyObject *o);
int _go_PyType_CheckExact(PyObject *o);
int _go_PyType_GetName(PyTypeObject *t);

int _go_PyLong_Check(PyObject *p);
int _go_PyLong_CheckExact(PyObject *p);
Expand Down
10 changes: 0 additions & 10 deletions type.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,3 @@ func PyType_Check(o *PyObject) bool {
func PyType_CheckExact(o *PyObject) bool {
return C._go_PyType_CheckExact(toc(o)) != 0
}

// func PyType_GetName(o *PyObject) string {
// r := togo(C._go_PyType_GetName(toc(o.Type())))
// defer r.DecRef()
//
// str := r.Str()
// defer str.DecRef()
//
// return PyUnicode_AsUTF8(str)
// }

0 comments on commit 01b6391

Please sign in to comment.