Lichen

Annotated lib/native.py

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