Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > internal class' static properties and constants
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 10th April 12:24
mike
External User
 
Posts: 1
Default internal class' static properties and constants



--------------enigA0AE25CBEBC43BC48E6EC8B9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Yes, the internal part uses zend_strndup() while the userspace part
- I guess - estrndup().


This is from zend_reflection_api ReflectionProperty::setValue().
I assume it is meant to prevent useless operations,
because when else should the zvals point to the same address?


I actually thought that there should be an "else { zval_ptr_dtor(&value) }"?
Every place I looked at where "temporary zvals" are used, initialize them with refcount=0.

Yeah, this is a matter of optimization which I was not thinking about
in the first place, sorry.


Well, I didn't really get the idea of this const updating yet, so apologize
if I'm totally wrong here. Ok, so it is a problem that the const updating
routine (whatever it does) assumes that memory was emalloc()'d but why do
constants_table and default_static_properties need to be updated for
every request? They're not supposed to change their values after
declaration, are they?


Hm...? default_static_properties' destructor is zval_internal_ptr_dtor, so?


Well, I'm the one who most strongly hopes that, as my HttpResponse class
is just a bad hack until so-called v6. As you probably know, I'm a first
time extension writer and still learning a lot and my knowledge of the
internals is still quite low. Thanks, --
Michael - < mike(@)php.net >

--------------enigA0AE25CBEBC43BC48E6EC8B9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)

iD8DBQFDAuPt2pTtEijQyW0RAgTNAJ9anCQszEheJ1gEap20ey LUWuHaJgCeM4mu
Zq3jWKWqOhhX1kLoDqZhoSg=
=r9lN
-----END PGP SIGNATURE-----

--------------enigA0AE25CBEBC43BC48E6EC8B9--
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666