Lichen

lib/native.py

206:1a64c775111a
2016-11-22 Paul Boddie Fixed fragment allocation in the native functions and added some list and buffer operations, extending the buffer class. Eventually, buffer and list may be combined in some way.
     1 #!/usr/bin/env python     2      3 """     4 Native library functions.     5      6 Copyright (C) 2011, 2015, 2016 Paul Boddie <paul@boddie.org.uk>     7      8 This program is free software; you can redistribute it and/or modify it under     9 the terms of the GNU General Public License as published by the Free Software    10 Foundation; either version 3 of the License, or (at your option) any later    11 version.    12     13 This program is distributed in the hope that it will be useful, but WITHOUT    14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS    15 FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more    16 details.    17     18 You should have received a copy of the GNU General Public License along with    19 this program.  If not, see <http://www.gnu.org/licenses/>.    20 """    21     22 def _exit(status): pass    23 def _get_argv(): pass    24 def _get_path(): pass    25     26 def _is(x, y): pass    27 def _is_not(x, y): pass    28     29 def _int_add(self, other): pass    30 def _int_div(self, other): pass    31 def _int_mod(self, other): pass    32 def _int_mul(self, other): pass    33 def _int_pow(self, other): pass    34 def _int_sub(self, other): pass    35     36 def _int_and(self, other): pass    37 def _int_or(self, other): pass    38 def _int_xor(self, other): pass    39     40 def _int_lt(self, other): pass    41 def _int_gt(self, other): pass    42 def _int_eq(self, other): pass    43 def _int_ne(self, other): pass    44     45 def _int_str(self): pass    46     47 def _str_add(self, other): pass    48 def _str_lt(self, other): pass    49 def _str_gt(self, other): pass    50 def _str_eq(self, other): pass    51 def _str_len(self): pass    52 def _str_nonempty(self): pass    53     54 def _list_init(size): pass    55 def _list_append(self, value): pass    56 def _list_concat(self, other): pass    57 def _list_len(self): pass    58 def _list_nonempty(self): pass    59 def _list_element(self, index): pass    60     61 def _buffer_str(self): pass    62     63 def _list_to_tuple(l): pass    64     65 def _tuple_init(args, size): pass    66 def _tuple_len(self): pass    67 def _tuple_element(self, index): pass    68     69 def _isinstance(obj, cls): pass    70     71 def _read(fd, n): pass    72 def _write(fd, str): pass    73     74 # vim: tabstop=4 expandtab shiftwidth=4