[Poppler-bugs] [Bug 50992] library should be thread-safe

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 15 00:31:54 PST 2013


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

--- Comment #141 from Thomas Freitag <Thomas.Freitag at alfa.de> ---
(In reply to comment #140)
> Test Regression is good, horray!
> 
> Now let's look at the code :-)
> 
> First the small easy stuff ;-)
> 
> In the qt4 frotend there's this change
> 
> -       m_doc->doc->getDocInfo( &info );
> -       if ( !info.isDict() )
> +       XRef *xref = m_doc->doc->getXRef()->copy();
> +       Object *infoObj = xref->getDocInfo(&info);
> +       if ( !infoObj->isDict() ) {
>             return QStringList();
> +       }
>  
> -       Dict *infoDict = info.getDict();
> +       Dict *infoDict = infoObj->getDict();
> 
> 
> Any reason we can not keep using info? i.e. something like
> 
> -       m_doc->doc->getDocInfo( &info );
> +       XRef *xref = m_doc->doc->getXRef()->copy();
> +       xref->getDocInfo(&info);
>         if ( !info.isDict() )
>             return QStringList();
>  
>         Dict *infoDict = info.getDict();
> 

No idea why I thought such complicate.Your code looks definitely smarter.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20130115/8a2155b6/attachment.html>


More information about the Poppler-bugs mailing list