Date: 11/15/00
- Next message: Uwe Steinmann: "Re: [PHP-DEV] PHP 4.0 Bug #7820 Updated: xmlFreeURI not found"
- Previous message: marten <email protected>: "[PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- In reply to: chrisv <email protected>: "Re: [PHP-DEV] generation user classes by the API"
- Next in thread: moshe doron: "[PHP-DEV] may header like `OO case' 'll do the job?"
- Reply: moshe doron: "[PHP-DEV] may header like `OO case' 'll do the job?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
thanks for the replaying,
being spending some hours trying hack the code, the only thing i found is
that i did't explain
myself well.
lets say i have this simple php code:
//////////////////////////////////////////////
class a{
var $a;
function a($a){
$this->a=$a;
}
}
function do_a(){
$a = new a(1);
}
////////////////////////////////////////////////
now for some reasons [do_a() is complex string manipulation function] i
wrote do_a() in C.
those lines (taken from dir.c):
//
INIT_CLASS_ENTRY(dir_class_entry, "Directory", php_dir_class_functions);
dir_class_entry_ptr = zend_register_internal_class(&dir_class_entry);
object_init_ex(return_value, dir_class_entry_ptr);
add_property_stringl(return_value, "path", (*arg)->value.str.val,
(*arg)->value.str.len, 1);
add_property_resource(return_value, "handle", dirp->id);
//
as i understood, used for creating new object but not referring to object
that allready exist (by the *php* script). if i wrong here please correct
me.
so my questions are:
1. how i can get the dir_class_entry_ptr pointer of class that allready
exist.
2. how to call this object function (constructor function this case) coz the
object_init_ex() doesnt seem do it automatically.
--moshe. mosdoron <email protected> icq: 1542485
<chrisv <email protected>> wrote in message news:Pine.LNX.4.21.0011130843330.13806-100000 <email protected> > On Mon, 13 Nov 2000, moshe doron wrote: > > > hi. > > > > can i generate classes from the c code like i can do it with the > > ZEND_API int call_user_function_ex() function? > > > > It's possible to do -- read ext/standard/dir.c for an example. > > Chris > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe <email protected> > For additional commands, e-mail: php-dev-help <email protected> > To contact the list administrators, e-mail: php-list-admin <email protected> >
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Uwe Steinmann: "Re: [PHP-DEV] PHP 4.0 Bug #7820 Updated: xmlFreeURI not found"
- Previous message: marten <email protected>: "[PHP-DEV] PHP 4.0 Bug #7829: hex2bin()?"
- In reply to: chrisv <email protected>: "Re: [PHP-DEV] generation user classes by the API"
- Next in thread: moshe doron: "[PHP-DEV] may header like `OO case' 'll do the job?"
- Reply: moshe doron: "[PHP-DEV] may header like `OO case' 'll do the job?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

