1.1 --- a/templates/native.h Wed Dec 07 17:37:00 2016 +0100
1.2 +++ b/templates/native.h Thu Dec 08 18:51:05 2016 +0100
1.3 @@ -1,18 +1,42 @@
1.4 +/* Native functions.
1.5 +
1.6 +Copyright (C) 2016 Paul Boddie <paul@boddie.org.uk>
1.7 +
1.8 +This program is free software; you can redistribute it and/or modify it under
1.9 +the terms of the GNU General Public License as published by the Free Software
1.10 +Foundation; either version 3 of the License, or (at your option) any later
1.11 +version.
1.12 +
1.13 +This program is distributed in the hope that it will be useful, but WITHOUT
1.14 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.15 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.16 +details.
1.17 +
1.18 +You should have received a copy of the GNU General Public License along with
1.19 +this program. If not, see <http://www.gnu.org/licenses/>.
1.20 +*/
1.21 +
1.22 #ifndef __NATIVE_H__
1.23 #define __NATIVE_H__
1.24
1.25 -/* Native functions. */
1.26 +/* Environment support. */
1.27
1.28 __attr __fn_native__exit(__attr __args[]);
1.29 __attr __fn_native__get_argv(__attr __args[]);
1.30 __attr __fn_native__get_path(__attr __args[]);
1.31
1.32 +/* Identity testing. */
1.33 +
1.34 __attr __fn_native__is(__attr __args[]);
1.35 __attr __fn_native__is_not(__attr __args[]);
1.36
1.37 +/* Limit definition. */
1.38 +
1.39 __attr __fn_native__get_maxint(__attr __args[]);
1.40 __attr __fn_native__get_minint(__attr __args[]);
1.41
1.42 +/* Integer operations. */
1.43 +
1.44 __attr __fn_native__int_add(__attr __args[]);
1.45 __attr __fn_native__int_div(__attr __args[]);
1.46 __attr __fn_native__int_mod(__attr __args[]);
1.47 @@ -38,6 +62,8 @@
1.48
1.49 __attr __fn_native__int_str(__attr __args[]);
1.50
1.51 +/* String operations. */
1.52 +
1.53 __attr __fn_native__str_add(__attr __args[]);
1.54 __attr __fn_native__str_lt(__attr __args[]);
1.55 __attr __fn_native__str_gt(__attr __args[]);
1.56 @@ -47,6 +73,8 @@
1.57 __attr __fn_native__str_ord(__attr __args[]);
1.58 __attr __fn_native__str_substr(__attr __args[]);
1.59
1.60 +/* List operations. */
1.61 +
1.62 __attr __fn_native__list_init(__attr __args[]);
1.63 __attr __fn_native__list_setsize(__attr __args[]);
1.64 __attr __fn_native__list_append(__attr __args[]);
1.65 @@ -56,15 +84,22 @@
1.66 __attr __fn_native__list_element(__attr __args[]);
1.67 __attr __fn_native__list_setelement(__attr __args[]);
1.68
1.69 +/* Buffer operations. */
1.70 +
1.71 __attr __fn_native__buffer_str(__attr __args[]);
1.72
1.73 +/* Method binding. */
1.74 +
1.75 __attr __fn_native__get_using(__attr __args[]);
1.76
1.77 +/* Introspection. */
1.78 +
1.79 __attr __fn_native__object_getattr(__attr __args[]);
1.80 -
1.81 __attr __fn_native__isinstance(__attr __args[]);
1.82 __attr __fn_native__issubclass(__attr __args[]);
1.83
1.84 +/* Input/output. */
1.85 +
1.86 __attr __fn_native__fdopen(__attr __args[]);
1.87 __attr __fn_native__fread(__attr __args[]);
1.88 __attr __fn_native__fwrite(__attr __args[]);