Lichen

Change of templates/ops.h

825:8e9566713e1a
templates/ops.h
     1.1 --- a/templates/ops.h	Fri Jun 22 15:18:04 2018 +0200
     1.2 +++ b/templates/ops.h	Fri Jun 22 17:13:29 2018 +0200
     1.3 @@ -1,6 +1,6 @@
     1.4  /* Common operations.
     1.5  
     1.6 -Copyright (C) 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk>
     1.7 +Copyright (C) 2015, 2016, 2017, 2018 Paul Boddie <paul@boddie.org.uk>
     1.8  
     1.9  This program is free software; you can redistribute it and/or modify it under
    1.10  the terms of the GNU General Public License as published by the Free Software
    1.11 @@ -71,6 +71,8 @@
    1.12  __ref __test_common_object__(__ref obj, int pos, int code);
    1.13  __ref __test_common_type__(__ref obj, int pos, int code);
    1.14  
    1.15 +#define __to_error(REF) (REF ? REF : (__raise_type_error(), (__ref) 0))
    1.16 +
    1.17  #define __test_common_instance(OBJ, TYPENAME) (__test_common_instance__(OBJ, __ATTRPOS(TYPENAME), __ATTRCODE(TYPENAME)))
    1.18  #define __test_common_object(OBJ, TYPENAME) (__test_common_object__(OBJ, __ATTRPOS(TYPENAME), __ATTRCODE(TYPENAME)))
    1.19  #define __test_common_type(OBJ, TYPENAME) (__test_common_type__(OBJ, __ATTRPOS(TYPENAME), __ATTRCODE(TYPENAME)))