Re: tar module

From: Date: Thu, 13 Jan 2005 18:08:17 +0000
Subject: Re: tar module
References: 1 2 3  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1795@lists.php.net to get a copy of this message
The thing is, your C code can't (or shouldn't) try to do magic at runtime for this kind of thing. If you need to get at C functions from another module, you need to explicitly write code to call those functions at compile time; your module won't then work if the required module is missing. If you do things the dbx way, and eval code at runtime, you're really doing things the wrong way. If you want to open up a file and use zlib decompression, the best way, from a php internals perspective, is to attempt to open the stream using the zlib wrapper (or the filter) and pull the data out that way. By doing this, you're shifting the burden of module management to the streams layer, and making everybodies lives easier. Hopefully, libtar allows you to use some kind of pluggable input layer so that you can feed any php stream into it. If not, it shouldn't be too hard to make it work that way. --Wez. On Thu, 13 Jan 2005 09:45:49 +0100, Michael Wallner <mike@php.net> wrote: > >>Also, I was wondering if there's any way to determine from within one > >>module if another module is enabled ? > > > > Which leads to the question, "why do you need to know?" :) > > I bet he wants to know if zlib is enabled :)

« previous php.pecl.dev (#1795) next »