Andreas Maier <staubim(a)quantentunnel.de> wrote:
+static inline HRESULT enumvar_get_next_item(EnumeratorInstance *This) +{ + HRESULT hres; + VARIANT nextitem; + + if (This->atend) + { + This->item = jsval_undefined(); + return S_OK; + } + + /* dont leak pervious value */ + jsval_release(This->item); + + /* not at end ... get next item */ + VariantInit(&nextitem); + hres = IEnumVARIANT_Next(This->enumvar, 1, &nextitem, NULL); + if (hres == S_OK) + { + hres = variant_to_jsval(&nextitem, &This->item); + if (FAILED(hres)) + { + ERR("failed to convert jsval to variant!"); + This->item = jsval_undefined(); + } + } + else + { + This->item = jsval_undefined(); + This->atend = TRUE; + } + VariantClear(&nextitem); + + return S_OK; +}
It should be possible to get rid of the 'atend' variable.
default: - FIXME("unimplemented flags: %x\n", flags); + ERR("unimplemented flags: %x\n", flags);
It still should be FIXME. Also all the remaining ERR()s should be changed either to a WARN() or a FIXME(). -- Dmitry.