[Poppler-bugs] [Bug 64815] [TAGGEDPDF] Parse the Tagged-PDF document structure tree when present

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Sep 30 01:27:57 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=64815

--- Comment #47 from Carlos Garcia Campos <carlosgc at gnome.org> ---
Comment on attachment 86675
  --> https://bugs.freedesktop.org/attachment.cgi?id=86675
[PATCH v8 02/15] Implement Object::takeString() method

Review of attachment 86675:
-----------------------------------------------------------------

::: poppler/Object.h
@@ +199,5 @@
>    double getNum() { OBJECT_3TYPES_CHECK(objInt, objInt64, objReal);
>      return type == objInt ? (double)intg : type == objInt64 ? (double)int64g : real; }
>    GooString *getString() { OBJECT_TYPE_CHECK(objString); return string; }
> +  GooString *takeString() {
> +    OBJECT_TYPE_CHECK(objString); GooString *s = string; initNull(); return s; }

I don't think we should call initNull. We are just stealing the object
contents, but the object type should not change. Also calling initNull here
would unbalance the numAllocs array increments/decrements when memory debug is
enabled. I think we should just set string to NULL, so that when free() is
called it will do nothing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20130930/599c9c79/attachment.html>


More information about the Poppler-bugs mailing list