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 <[EMAIL PROTECTED]>
Did I help you? Consider a gift: http://wishlist.edwardbear.org/

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to