1 #!/usr/bin/env python 2 3 """ 4 Native library functions. None of these are actually defined here. Instead, 5 native implementations are substituted when each program is built. 6 7 Copyright (C) 2011, 2015, 2016 Paul Boddie <paul@boddie.org.uk> 8 9 This program is free software; you can redistribute it and/or modify it under 10 the terms of the GNU General Public License as published by the Free Software 11 Foundation; either version 3 of the License, or (at your option) any later 12 version. 13 14 This program is distributed in the hope that it will be useful, but WITHOUT 15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 16 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 details. 18 19 You should have received a copy of the GNU General Public License along with 20 this program. If not, see <http://www.gnu.org/licenses/>. 21 """ 22 23 # Environment support. 24 25 def _exit(status): pass 26 def _get_argv(): pass 27 def _get_path(): pass 28 29 # Identity testing. 30 31 def _is(x, y): pass 32 def _is_not(x, y): pass 33 34 # Integer operations. 35 36 def _int_add(self, other): pass 37 def _int_div(self, other): pass 38 def _int_mod(self, other): pass 39 def _int_mul(self, other): pass 40 def _int_neg(self): pass 41 def _int_pow(self, other): pass 42 def _int_sub(self, other): pass 43 44 def _int_and(self, other): pass 45 def _int_or(self, other): pass 46 def _int_xor(self, other): pass 47 48 def _int_lt(self, other): pass 49 def _int_gt(self, other): pass 50 def _int_eq(self, other): pass 51 def _int_ne(self, other): pass 52 53 def _int_str(self): pass 54 55 # String operations. 56 57 def _str_add(self, other): pass 58 def _str_lt(self, other): pass 59 def _str_gt(self, other): pass 60 def _str_eq(self, other): pass 61 def _str_len(self): pass 62 def _str_nonempty(self): pass 63 def _str_substr(self, start, size): pass 64 65 # List operations. 66 67 def _list_init(size): pass 68 def _list_setsize(self, size): pass 69 def _list_append(self, value): pass 70 def _list_concat(self, other): pass 71 def _list_len(self): pass 72 def _list_nonempty(self): pass 73 def _list_element(self, index): pass 74 def _list_setelement(self, index, value): pass 75 76 # Dictionary operations. 77 78 def _dict_init(size): pass 79 def _dict_bucketsize(self, index): pass 80 def _dict_key(self, index, element): pass 81 def _dict_value(self, index, element): pass 82 def _dict_additem(self, index, key, value): pass 83 def _dict_setitem(self, index, element, key, value): pass 84 def _dict_keys(self): pass 85 def _dict_values(self): pass 86 87 # Buffer operations. 88 89 def _buffer_str(self): pass 90 91 # Method binding. 92 93 def _get_using(callable, instance): pass 94 95 # Introspection. 96 97 def _object_getattr(obj, name, default): pass 98 def _isinstance(obj, cls): pass 99 def _issubclass(obj, cls): pass 100 101 # Input/output. 102 103 def _read(fd, n): pass 104 def _write(fd, str): pass 105 106 # vim: tabstop=4 expandtab shiftwidth=4