playing with inline_C
| From: | Alan Knowles | Date: | Sat, 19 Oct 2002 10:03:34 +0000 |
| Subject: | playing with inline_C | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-10125@lists.php.net to get a copy of this message | ||
George, just been having a play with inline C, although I've not got it to work yet - just a few thoughts..
would it be worth merging/using the extention builder in the pear installer -
This would probably mean changing this bit of builder.php::build() to
| if (PEAR_OS == "Windows") {
return $this->_build_win32($descfile,$callback);
}
if (PEAR_OS != 'Unix') {
return $this->raiseError("building extensions not supported on this platform");
}
if (PEAR::isError($info = $this->infoFromDescriptionFile($descfile))) {
return $info;
}
$dir = dirname($des||cfile);|
| ....
to :
|| if (!is_array($descfile) && PEAR::isError($info = $this->infoFromDescriptionFile($descfile))) {
return $info;
} else {
$info = $descfile;
}
|| $dir = dirname($des||cfile);|
| if (PEAR_OS == "Windows") {
|| return $this->_build_win32($info,$dir,$callback);
|| }
if (PEAR_OS == 'Unix') {
|| return $this->_build_unix($info,$dir,$callback);
|| }
|| return $this->raiseError("building extensions not supported on this platform");|| |||
|
hence making build() accept either an array of options or, the standard description file. |||
||
a) Is it really neccessary to use Inline_C.php.in, just using a instantator, or factory method seems a little nicer..
$ic = new Inline_C('/path/to/ext.dir/');
b) Inline_C.php should really be named C.php :)
c) when running makebuildtree.head
on the php head (probably a few month old), I get
configure: error: can not find sources in . or ..
d) can you add an optional argument to ->compiler($extensionname), so you can hard code an extension name, rather than getting an md5 one?
If you dont mind me hacking away on it (and the pear installer), just give us a nod :)
Regards
Alan