vendor: temporary duktape fix

This commit is contained in:
Péter Szilágyi 2017-12-19 19:07:39 +02:00
parent 4de03429af
commit 42d03fc687
2 changed files with 2 additions and 2 deletions

View file

@ -973,7 +973,7 @@ func (d *Context) PushBuffer(size int, dynamic bool) unsafe.Pointer {
} }
// See: http://duktape.org/api.html#duk_push_c_function // See: http://duktape.org/api.html#duk_push_c_function
func (d *Context) PushCFunction(fn *[0]byte, nargs int) int { func (d *Context) PushCFunction(fn *[0]byte, nargs int64) int {
return int(C.duk_push_c_function(d.duk_context, fn, C.duk_idx_t(nargs))) return int(C.duk_push_c_function(d.duk_context, fn, C.duk_idx_t(nargs)))
} }

View file

@ -284,7 +284,7 @@ struct duk_time_components {
/* Indicates that a native function does not have a fixed number of args, /* Indicates that a native function does not have a fixed number of args,
* and the argument stack should not be capped/extended at all. * and the argument stack should not be capped/extended at all.
*/ */
#define DUK_VARARGS ((duk_uint_t) (-1)) #define DUK_VARARGS ((duk_int_t) (-1))
/* Number of value stack entries (in addition to actual call arguments) /* Number of value stack entries (in addition to actual call arguments)
* guaranteed to be allocated on entry to a Duktape/C function. * guaranteed to be allocated on entry to a Duktape/C function.