curl-library
Re: [PHP-DEV] Work is beginning on cURL and PHP again
Date: 21 Oct 2002 22:28:38 +0200
On Mon, 2002-10-21 at 22:15, Jon Parise wrote:
> On Mon, Oct 21, 2002 at 10:12:55PM +0200, Sterling Hughes wrote:
>
> > * Autogenerating much of the interface between cURL and PHP, allowing
> > PHP to support multiple versions of the underlying cURL library
>
> By what mechanism do you plan on implementing this?
>
Well, currently i plan on using a Perl script to read the curl.h
definition file, and generate the code for all options that don't meet
the following criterium:
1) There is a definition in for the constant in the file
php4/ext/curl/objects.def, in the form of something like:
CURLOPT_OPTNAME: {
// code goes here
}
2) the type of the constant is OBJECTPOINT
(the words "type" and "constant" are used loosely here :)
Then for constants that are definied in both curl/objects.def and
curl.h, i'll add the code for them into curl.c. Any other constants
will get simply get the "undefined constant" warning with E_ALL and cURL
will complain that the constant doesn't exist when curl_setopt() is
used, at least this is the current plan for auto-generation.
I'm also debating just having a standard (generated from the latest
stable cURL version) file, in case Perl is not present on the users
system (but if Perl isn't present on your system - that's pretty bad :)
-Sterling
-- Sterling Hughes <sterling_at_bumblebury.com> Did I help you? Consider a gift: http://wishlist.edwardbear.org/ ------------------------------------------------------- This sf.net emial is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4699841;7576298;k?http://www.sun.com/javavoteReceived on 2002-10-22