mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +02:00
missed some sexp_init_library defs
This commit is contained in:
parent
c57e71d3dd
commit
11ff9603ac
3 changed files with 12 additions and 3 deletions
|
@ -10,7 +10,10 @@ static sexp sexp_increment_cdr (sexp ctx, sexp self, sexp_sint_t n, sexp pair) {
|
|||
return SEXP_VOID;
|
||||
}
|
||||
|
||||
sexp sexp_init_library (sexp ctx, sexp self, sexp_sint_t n, sexp env) {
|
||||
sexp sexp_init_library (sexp ctx, sexp self, sexp_sint_t n, sexp env, const char* version, sexp_abi_identifier_t abi) {
|
||||
if (!(sexp_version_compatible(ctx, version, sexp_version)
|
||||
&& sexp_abi_compatible(ctx, abi, SEXP_ABI_IDENTIFIER)))
|
||||
return sexp_global(ctx, SEXP_G_ABI_ERROR);
|
||||
sexp_define_foreign(ctx, env, "increment-cdr!", 1, sexp_increment_cdr);
|
||||
return SEXP_VOID;
|
||||
}
|
||||
|
|
|
@ -19,8 +19,11 @@ static sexp copy_opcode (sexp ctx, struct sexp_opcode_struct *op) {
|
|||
return res;
|
||||
}
|
||||
|
||||
sexp sexp_init_library (sexp ctx, sexp self, sexp_sint_t n, sexp env) {
|
||||
sexp sexp_init_library (sexp ctx, sexp self, sexp_sint_t n, sexp env, const char* version, sexp_abi_identifier_t abi) {
|
||||
sexp_gc_var2(name, op);
|
||||
if (!(sexp_version_compatible(ctx, version, sexp_version)
|
||||
&& sexp_abi_compatible(ctx, abi, SEXP_ABI_IDENTIFIER)))
|
||||
return sexp_global(ctx, SEXP_G_ABI_ERROR);
|
||||
sexp_gc_preserve2(ctx, name, op);
|
||||
sexp_define_foreign(ctx, env, "num-parameters", 0, sexp_num_parameters);
|
||||
op = copy_opcode(ctx, &local_ref_op);
|
||||
|
|
|
@ -13,7 +13,10 @@ static sexp sexp_current_second (sexp ctx, sexp self, sexp_sint_t n) {
|
|||
return sexp_make_flonum(ctx, res + leap_seconds_since_epoch);
|
||||
}
|
||||
|
||||
sexp sexp_init_library (sexp ctx, sexp self, sexp_sint_t n, sexp env) {
|
||||
sexp sexp_init_library (sexp ctx, sexp self, sexp_sint_t n, sexp env, const char* version, sexp_abi_identifier_t abi) {
|
||||
if (!(sexp_version_compatible(ctx, version, sexp_version)
|
||||
&& sexp_abi_compatible(ctx, abi, SEXP_ABI_IDENTIFIER)))
|
||||
return sexp_global(ctx, SEXP_G_ABI_ERROR);
|
||||
sexp_define_foreign(ctx, env, "current-second", 0, sexp_current_second);
|
||||
return SEXP_VOID;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue