Hi Mark, Thanks for the patch! You are of course right, I commited your fix.
Cheers,
Dom
Am Freitag 30 April 2010 schrieb Mark Rogers:
> My reading of the 0.8.0 documentation is that podofo_free should be used by
> callers to release memory allocated by podofo_alloc (e.g. the buffer
> returned by GetFilteredCopy)
>
> This is pretty much essential when podofo is used as a Windows DLL since
> calling C runtime free() on the returned buffer isn't guaranteed to work
> across DLL boundaries.
>
> When compiled as a static library everything works, but when compiled as a
> Windows DLL there are linker errors because podofo_free isn't exported as
> a public symbol (because there are no PODOFO_API prefixes on podofo_free,
> podofo_realloc and podofo_malloc)
>
> If my understanding is correct here's a patch:
>
> PdfMemoryManagement.h - add PODOFO_API
> PODOFO_API void* podofo_malloc( size_t size );
> PODOFO_API void* podofo_realloc( void* buffer, size_t size );
> PODOFO_API void podofo_free( void* buffer );
>
> PdfMemoryManagement.cpp
> Add #include "PdfDefines.h" before first include.
>
> Only tested on Visual Studio - don't have a linux tool chain currently (but
> looks correct after a quick scan of the GCC documentation).
>
> PS Congratulations on getting the 0.8.0 release out - worked very smoothly
> apart from this issue.
>
> Best Regards
> Mark
>
> Mark Rogers - [email protected]
> PowerMapper Software Ltd - http://www.powermapper.com
>
>
>
> ---------------------------------------------------------------------------
> --- _______________________________________________
> Podofo-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/podofo-users
>
--
**********************************************************************
Dominik Seichter - [email protected]
KRename - http://www.krename.net - Powerful batch renamer for KDE
KBarcode - http://www.kbarcode.net - Barcode and label printing
PoDoFo - http://podofo.sf.net - PDF generation and parsing library
SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game, for KDE
Alan - http://alan.sf.net - A Turing Machine in Java
**********************************************************************
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
