Use generics for makeListProxy properly

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2019-05-19 15:26:49 +01:00
parent 78385629c3
commit 9ee92823e2

View File

@ -11,7 +11,6 @@
class Element { class Element {
prologue %{ prologue %{
#include <utils/corestrings.h> #include <utils/corestrings.h>
#define LIST_PROXY_MAGIC MAGIC(LIST_PROXY)
%}; %};
}; };
@ -206,7 +205,7 @@ method Element::getElementsByTagName ()
dom_string_unref(tagname); dom_string_unref(tagname);
if (exc != DOM_NO_ERR) return 0; if (exc != DOM_NO_ERR) return 0;
duk_get_global_string(ctx, LIST_PROXY_MAGIC); dukky_push_generics(ctx, "makeListProxy");
duk_push_pointer(ctx, nlist); duk_push_pointer(ctx, nlist);
dukky_create_object(ctx, PROTO_NAME(NODELIST), 1); dukky_create_object(ctx, PROTO_NAME(NODELIST), 1);