Jean-Philippe Barrette-LaPierre wrote:
Code put in my own repository, will make the changes available in the
next release.
On 5-Feb-08, at 4:41 PM, Piotr Niemcunowicz wrote:
Regarding example19: there should be a code to dispose pointers
from std::list<cURLpp::FormPart *> formParts.
Or maybe should the cURLpp take the ownership of pointers and free
them instead of cloning and leaving this to the library user?
Totally agree with you. I don't know what I was thinking. I'll put
the changes in the next release too.
BTW, thank you very much for the bug report AND the fix!
Great, please review attached patch, it should settle both things :)
BTW. when the new release will be avaliable?
--
Best whishes,
Piotr Niemcunowicz
--- Form.cpp 2007-08-28 01:35:16.000000000 +0200
+++ Form.cpp 2008-02-06 22:47:54.000000000 +0100
@@ -26,13 +26,12 @@
cURLpp::HttpPost::HttpPost(const Forms &posts)
+ : mFirst(NULL)
+ , mLast(NULL)
{
- cURLpp::FormPart *form;
- Forms::const_iterator pos;
- for(pos = posts.begin(); pos != posts.end(); pos++) {
- form = (*pos)->clone();
- mForms.push_back(form);
- form->add(&mFirst, &mLast);
+ for(Forms::const_iterator pos = posts.begin(); pos != posts.end(); pos++) {
+ mForms.push_back(*pos);
+ (*pos)->add(&mFirst, &mLast);
}
}
_______________________________________________
cURLpp mailing list
[email protected]
http://www.rrette.com/mailman/listinfo/curlpp