Loading perl/Curl_easy/Changes +3 −3 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ Revision history for Perl extension Curl::easy. Check out the file README for more info. 1.1.3 Wed Apr 18 2001: - Cris Bailiff <c.bailiff@devsecure.com> - Change/shorten module function names: Curl::easy::curl_easy_setopt becomes Curl::easy::setopt etc. This requires minor changes to existing scripts.... - Change/shorten module function names: Curl::easy::curl_easy_setopt becomes Curl::easy::setopt etc. This requires minor changes to existing scripts.... - Added callback function support to pass arbitrary SV * (including FILE globs) from perl through libcurl to the perl callback. - Make callbacks still work with existing scripts which use STDIO Loading perl/Curl_easy/MANIFEST +1 −0 Original line number Diff line number Diff line Changes MANIFEST Makefile.PL README easy.pm easy.xs test.pl perl/Curl_easy/README +9 −9 Original line number Diff line number Diff line Loading @@ -12,16 +12,16 @@ installed. You then may install this module via the usual way: make install The module provides the same functionality as libcurl provides to C programs, please refer to the documentation of libcurl. please refer to the documentation of libcurl. Some examples may be found in test.pl. A short example how to use the module may be found in test.pl. This software is distributed AS IS, WITHOUT WARRANTY OF ANY KIND, either express or implied. Send praise, patches, money, beer and pizza to the author. Send complaints to /dev/null. ;-) This Software is distributed AS IS, WITHOUT WARRANTY OF ANY KIND, either express or implied. Send praise, patches, money, beer and pizza to the author. Send complaints to /dev/null. ;-) The author of this software is Georg Horn <horn@koblenz-net.de> Parts of the callback support have been added by Cris Bailiff <c.bailiff@awayweb.com> and Forrest Cahoon <forrest.cahoon@merrillcorp.com> The author of this module is Georg Horn <horn@koblenz-net.de> The latest version of this module can be dowloaded from http://koblenz-net.de/~horn/export/ The latest version can be downloaded from http://koblenz-net.de/~horn/export/ perl/Curl_easy/easy.xs +49 −56 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ fwrite_wrapper (const void *ptr, XPUSHs(sv_2mortal(newSVsv(sv))); /* CURLOPT_FILE SV* */ PUTBACK; count = call_sv((SV *)call_function, G_SCALAR); count = perl_call_sv((SV *) call_function, G_SCALAR); SPAGAIN; if (count != 1) Loading Loading @@ -192,7 +192,7 @@ read_callback_func( void *ptr, size_t size, XPUSHs(sv_2mortal(newSVsv(sv))); /* CURLOPT_INFILE SV* */ PUTBACK ; count = call_sv(read_callback, G_SCALAR); count = perl_call_sv(read_callback, G_SCALAR); SPAGAIN; if (count != 1) Loading @@ -209,7 +209,6 @@ read_callback_func( void *ptr, size_t size, FREETMPS ; LEAVE ; return (size_t) (mylen/size); } else { /* default to a normal 'fread' */ /* stream could be a FILE * or an SV * */ Loading Loading @@ -318,12 +317,11 @@ closepolicy_callback_func(void *clientp) PUSHMARK(SP); PUTBACK; argc = call_sv(closepolicy_callback, G_SCALAR); argc = perl_call_sv(closepolicy_callback, G_SCALAR); SPAGAIN; if (argc != 1) { croak ("Unexpected number of arguments returned from closefunction callback\n"); croak("Unexpected number of arguments returned from closefunction callback\n"); } pl_status = POPs; status = SvTRUE(pl_status) ? 0 : 1; Loading Loading @@ -560,22 +558,18 @@ int option SV * value CODE: if (option < CURLOPTTYPE_OBJECTPOINT) { /* This is an option specifying an integer value: */ RETVAL = curl_easy_setopt(curl, option, (long)SvIV(value)); } else if (option == CURLOPT_FILE || option == CURLOPT_INFILE || option == CURLOPT_WRITEHEADER || option == CURLOPT_PROGRESSDATA || option == CURLOPT_PASSWDDATA) { /* This is an option specifying an SV * value: */ RETVAL = curl_easy_setopt(curl, option, newSVsv(ST(2))); } else if (option == CURLOPT_ERRORBUFFER) { /* Pass in variable name for storing error messages... */ RETVAL = curl_easy_setopt(curl, option, errbuf); if (errbufvarname) free(errbufvarname); errbufvarname = strdup((char *)SvPV(value, PL_na)); } else if (option == CURLOPT_WRITEFUNCTION || option == CURLOPT_READFUNCTION || option == CURLOPT_PROGRESSFUNCTION || option == CURLOPT_PASSWDFUNCTION || option == CURLOPT_HEADERFUNCTION) { Loading Loading @@ -608,7 +602,6 @@ CODE: */ } RETVAL = -1; } else if (option == CURLOPT_HTTPHEADER || option == CURLOPT_QUOTE || option == CURLOPT_POSTQUOTE) { /* This is an option specifying a list of curl_slist structs: */ Loading Loading
perl/Curl_easy/Changes +3 −3 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ Revision history for Perl extension Curl::easy. Check out the file README for more info. 1.1.3 Wed Apr 18 2001: - Cris Bailiff <c.bailiff@devsecure.com> - Change/shorten module function names: Curl::easy::curl_easy_setopt becomes Curl::easy::setopt etc. This requires minor changes to existing scripts.... - Change/shorten module function names: Curl::easy::curl_easy_setopt becomes Curl::easy::setopt etc. This requires minor changes to existing scripts.... - Added callback function support to pass arbitrary SV * (including FILE globs) from perl through libcurl to the perl callback. - Make callbacks still work with existing scripts which use STDIO Loading
perl/Curl_easy/MANIFEST +1 −0 Original line number Diff line number Diff line Changes MANIFEST Makefile.PL README easy.pm easy.xs test.pl
perl/Curl_easy/README +9 −9 Original line number Diff line number Diff line Loading @@ -12,16 +12,16 @@ installed. You then may install this module via the usual way: make install The module provides the same functionality as libcurl provides to C programs, please refer to the documentation of libcurl. please refer to the documentation of libcurl. Some examples may be found in test.pl. A short example how to use the module may be found in test.pl. This software is distributed AS IS, WITHOUT WARRANTY OF ANY KIND, either express or implied. Send praise, patches, money, beer and pizza to the author. Send complaints to /dev/null. ;-) This Software is distributed AS IS, WITHOUT WARRANTY OF ANY KIND, either express or implied. Send praise, patches, money, beer and pizza to the author. Send complaints to /dev/null. ;-) The author of this software is Georg Horn <horn@koblenz-net.de> Parts of the callback support have been added by Cris Bailiff <c.bailiff@awayweb.com> and Forrest Cahoon <forrest.cahoon@merrillcorp.com> The author of this module is Georg Horn <horn@koblenz-net.de> The latest version of this module can be dowloaded from http://koblenz-net.de/~horn/export/ The latest version can be downloaded from http://koblenz-net.de/~horn/export/
perl/Curl_easy/easy.xs +49 −56 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ fwrite_wrapper (const void *ptr, XPUSHs(sv_2mortal(newSVsv(sv))); /* CURLOPT_FILE SV* */ PUTBACK; count = call_sv((SV *)call_function, G_SCALAR); count = perl_call_sv((SV *) call_function, G_SCALAR); SPAGAIN; if (count != 1) Loading Loading @@ -192,7 +192,7 @@ read_callback_func( void *ptr, size_t size, XPUSHs(sv_2mortal(newSVsv(sv))); /* CURLOPT_INFILE SV* */ PUTBACK ; count = call_sv(read_callback, G_SCALAR); count = perl_call_sv(read_callback, G_SCALAR); SPAGAIN; if (count != 1) Loading @@ -209,7 +209,6 @@ read_callback_func( void *ptr, size_t size, FREETMPS ; LEAVE ; return (size_t) (mylen/size); } else { /* default to a normal 'fread' */ /* stream could be a FILE * or an SV * */ Loading Loading @@ -318,12 +317,11 @@ closepolicy_callback_func(void *clientp) PUSHMARK(SP); PUTBACK; argc = call_sv(closepolicy_callback, G_SCALAR); argc = perl_call_sv(closepolicy_callback, G_SCALAR); SPAGAIN; if (argc != 1) { croak ("Unexpected number of arguments returned from closefunction callback\n"); croak("Unexpected number of arguments returned from closefunction callback\n"); } pl_status = POPs; status = SvTRUE(pl_status) ? 0 : 1; Loading Loading @@ -560,22 +558,18 @@ int option SV * value CODE: if (option < CURLOPTTYPE_OBJECTPOINT) { /* This is an option specifying an integer value: */ RETVAL = curl_easy_setopt(curl, option, (long)SvIV(value)); } else if (option == CURLOPT_FILE || option == CURLOPT_INFILE || option == CURLOPT_WRITEHEADER || option == CURLOPT_PROGRESSDATA || option == CURLOPT_PASSWDDATA) { /* This is an option specifying an SV * value: */ RETVAL = curl_easy_setopt(curl, option, newSVsv(ST(2))); } else if (option == CURLOPT_ERRORBUFFER) { /* Pass in variable name for storing error messages... */ RETVAL = curl_easy_setopt(curl, option, errbuf); if (errbufvarname) free(errbufvarname); errbufvarname = strdup((char *)SvPV(value, PL_na)); } else if (option == CURLOPT_WRITEFUNCTION || option == CURLOPT_READFUNCTION || option == CURLOPT_PROGRESSFUNCTION || option == CURLOPT_PASSWDFUNCTION || option == CURLOPT_HEADERFUNCTION) { Loading Loading @@ -608,7 +602,6 @@ CODE: */ } RETVAL = -1; } else if (option == CURLOPT_HTTPHEADER || option == CURLOPT_QUOTE || option == CURLOPT_POSTQUOTE) { /* This is an option specifying a list of curl_slist structs: */ Loading