# HG changeset patch # User David Demelier # Date 1466660222 -7200 # Node ID 21fa534ce42f5ec33252e7dd9634d7974e3f3e04 # Parent 668975a91fb24dff7d1085dc3653bf75f81eda18 Js: get rid of dukx_enumerate diff -r 668975a91fb2 -r 21fa534ce42f modules/js/duktape.hpp --- a/modules/js/duktape.hpp Tue Jun 21 15:55:57 2016 +0200 +++ b/modules/js/duktape.hpp Thu Jun 23 07:37:02 2016 +0200 @@ -360,28 +360,6 @@ } /** - * Enumerate an object or an array at the specified index. - * - * \param ctx the context - * \param index the object or array index - * \param flags the optional flags to pass to duk_enum - * \param getvalue set to true if you want to extract the value - * \param func the function to call for each properties - */ -template -void dukx_enumerate(duk_context *ctx, int index, duk_uint_t flags, duk_bool_t getvalue, Func &&func) -{ - duk_enum(ctx, index, flags); - - while (duk_next(ctx, -1, getvalue)) { - func(ctx); - duk_pop_n(ctx, 1 + (getvalue ? 1 : 0)); - } - - duk_pop(ctx); -} - -/** * Throw an ECMAScript exception. * * \param ctx the context