Lichen

lib/native.py

326:e31fddc66a6c
2016-12-06 Paul Boddie Added tests of object naming.
     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 # Limit definition.    35     36 def _get_maxint(): pass    37 def _get_minint(): pass    38     39 # Integer operations.    40     41 def _int_add(self, other): pass    42 def _int_div(self, other): pass    43 def _int_mod(self, other): pass    44 def _int_mul(self, other): pass    45 def _int_neg(self): pass    46 def _int_pow(self, other): pass    47 def _int_sub(self, other): pass    48     49 def _int_and(self, other): pass    50 def _int_not(self): pass    51 def _int_or(self, other): pass    52 def _int_xor(self, other): pass    53     54 def _int_lt(self, other): pass    55 def _int_gt(self, other): pass    56 def _int_eq(self, other): pass    57 def _int_ne(self, other): pass    58     59 def _int_str(self): pass    60     61 # String operations.    62     63 def _str_add(self, other): pass    64 def _str_eq(self, other): pass    65 def _str_gt(self, other): pass    66 def _str_lt(self, other): pass    67 def _str_len(self): pass    68 def _str_nonempty(self): pass    69 def _str_ord(self): pass    70 def _str_substr(self, start, size): pass    71     72 # List operations.    73     74 def _list_init(size): pass    75 def _list_setsize(self, size): pass    76 def _list_append(self, value): pass    77 def _list_concat(self, other): pass    78 def _list_len(self): pass    79 def _list_nonempty(self): pass    80 def _list_element(self, index): pass    81 def _list_setelement(self, index, value): pass    82     83 # Buffer operations.    84     85 def _buffer_str(self): pass    86     87 # Method binding.    88     89 def _get_using(callable, instance): pass    90     91 # Introspection.    92     93 def _object_getattr(obj, name, default): pass    94 def _isinstance(obj, cls): pass    95 def _issubclass(obj, cls): pass    96     97 # Input/output.    98     99 def _read(fd, n): pass   100 def _write(fd, str): pass   101    102 # vim: tabstop=4 expandtab shiftwidth=4