1.1 --- a/templates/ops.c Fri Nov 25 18:36:10 2016 +0100
1.2 +++ b/templates/ops.c Fri Nov 25 18:36:45 2016 +0100
1.3 @@ -65,6 +65,16 @@
1.4 return __get_class(obj) == type ? obj : 0;
1.5 }
1.6
1.7 +__ref __test_specific_object(__ref obj, __ref type)
1.8 +{
1.9 + return __test_specific_type(obj, type) || __test_specific_instance(obj, type) ? obj : 0;
1.10 +}
1.11 +
1.12 +__ref __test_specific_type(__ref obj, __ref type)
1.13 +{
1.14 + return obj == type ? obj : 0;
1.15 +}
1.16 +
1.17 __ref __test_common_instance(__ref obj, int pos, int code)
1.18 {
1.19 return __HASATTR(__get_class(obj), pos, code) ? obj : 0;