#1 2019-10-22 11:39:26

zed
Member
From: Belarus
Registered: 2015-02-26
Posts: 105

SynCurl: some minor improvements

1. Add some missing/renamed constants to the TCurlOption: https://github.com/synopse/mORMot/pull/243
Main issue of this constants is to be able to use modern progress callback function (CURLOPT_XFERINFOFUNCTION) as recommended in documentation https://curl.haxx.se/libcurl/c/CURLOPT_ … CTION.html 

2. Let pass libcurl dll name as a parameter: https://github.com/synopse/mORMot/pull/245
I would prefer to use the same library name for Win32 and Win64 versions with my application.

Last edited by zed (2019-10-22 11:42:22)

Offline

#2 2019-10-23 08:14:11

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: SynCurl: some minor improvements

I merged both pull requests.

Thanks!

Offline

#3 2019-10-26 13:43:27

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: SynCurl: some minor improvements

Offline

#4 2019-10-26 20:26:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: SynCurl: some minor improvements

Merged.

smile

Offline

#5 2019-10-27 08:15:25

zed
Member
From: Belarus
Registered: 2015-02-26
Posts: 105

Re: SynCurl: some minor improvements

And now, Delphi (2007, 10.3.2) can't compile this unit because of missing initialization section.

Fix:

initialization
  // empty

finalization
  if PtrInt(curl.Module)>0 then begin
    curl.global_cleanup;
    FreeLibrary(curl.Module);
  end;

Last edited by zed (2019-10-27 08:29:29)

Offline

#6 2019-10-27 19:11:02

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: SynCurl: some minor improvements

Delphi 2007 and 10.3 didn't complain on my computer...

Because the unit was disabled on Windows!

Should be fixed now by https://synopse.info/fossil/info/0eaf4c1cc3

Offline

Board footer

Powered by FluxBB