Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10070 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8919 invoked by uid 1010); 24 May 2004 14:56:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8874 invoked from network); 24 May 2004 14:56:33 -0000 Received: from unknown (HELO BLR-DSMASTER.BLR.NOVELL.COM) (164.99.147.9) by pb1.pair.com with SMTP; 24 May 2004 14:56:33 -0000 Received: from linux.blr.novell.com [164.99.145.41] by BLR-DSMASTER.BLR.NOVELL.COM; Mon, 24 May 2004 20:26:30 +0530 Reply-To: kameshj@fastmail.fm To: internals@lists.php.net Content-Type: text/plain Message-ID: <1085410583.2198.7.camel@linux.local> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Mon, 24 May 2004 20:26:23 +0530 Content-Transfer-Encoding: 7bit Subject: where to find all the classes loaded in PHP From: kameshj@fastmail.fm (Kamesh Jayachandran) Hi All, I am working on porting APC to PHP 5.0. I want to know where to get all the use defined class entries(zend_class_entry) to copy to the APC cache. Old APC code was copying this information from CG(class_table) I tried to do the same but could not get much of a info from here. For example I have a class by name 'Simple' which do not have any parent class. The apc code checks for parent of a given class while copying The code looks like this, 'elem' is a pointer to 'Simple' zend_class_entry if(elem->parent) { //code to copy elem->parent->name to a newly allocated memory. } In my class 'Simple' I expect this if to fail as I assume parent to be null for a class that don't have any parent. But parent is not null which makes the if to succeed and hence accessing the name function of parent to fail with Segmentation fault. Thanks in advance With regards Kamesh Jayachandran