예제 #1
0
파일: class.go 프로젝트: MogeiWang/py
// Return true if klass is a subclass of base. Return false in all other cases.
func (t *Class) IsSubclass(base *Base) bool {
	return C.PyClass_IsSubclass(t.c(), base.c()) != 0
}
예제 #2
0
// int PyClass_IsSubclass(PyObject *klass, PyObject *base)
// Return true if klass is a subclass of base. Return false in all other cases.
// There are very few functions specific to instance objects.
func PyClass_IsSubclass(klass, base *PyObject) bool {
	return int2bool(C.PyClass_IsSubclass(topy(klass), topy(base)))
}