Commit graph

219 commits

Author SHA1 Message Date
Dmitry Stogov
1af60a2a71 Keep initialized object_handlers structures in read-only memory. 2018-03-14 14:01:45 +03:00
Anatol Belski
f4705b77ff Merge branch 'PHP-7.2'
* PHP-7.2:
  Remove duplicated assignment
2018-02-17 13:13:17 +01:00
Anatol Belski
0255c21319 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove duplicated assignment
2018-02-17 13:12:29 +01:00
Anatol Belski
a468752e53 Remove duplicated assignment 2018-02-17 13:10:59 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Nikita Popov
dcdd4abdb2 Make sure properties are initialized before cloning
Now that they are not memset, they need to be explicitly intialized,
as zend_objects_clone_members() destroys the old property values
first.
2017-11-25 22:51:37 +01:00
Nikita Popov
b72b1a4e4d Add zend_object_alloc() API
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.

Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
2017-11-25 17:12:37 +01:00
Dmitry Stogov
e2589b7d02 Use interned strings for "magic" property of internal classes. (not copyied into SHM) 2017-11-01 19:04:54 +03:00
Dmitry Stogov
49ea143bbd Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Dmitry Stogov
44e0b79ac6 Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values. 2017-09-20 02:25:56 +03:00
Andreas Treichel
f725d9b1b9 Implement Countable for DomNodeList and DOMNamedNodeMap (Request #74837) 2017-07-10 08:48:10 +02:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Joe Watkins
6a1d3c948b
Merge branch 'PHP-7.1'
* PHP-7.1:
  news entry for PR #2267
  Fixed #67474 (getElementsByTagNameNS and default namespace)
  Add (failing) testcase for bug #67474
2017-01-02 11:59:15 +00:00
Joe Watkins
243dff2057
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  news entry for PR #2267
  Fixed #67474 (getElementsByTagNameNS and default namespace)
  Add (failing) testcase for bug #67474
2017-01-02 11:58:14 +00:00
Arnout Boks
a8955926c2
Fixed #67474 (getElementsByTagNameNS and default namespace)
This bug was caused by the fact that dom_get_elements_by_tag_name_ns_raw
uses an empty string to filter on the default namespace (as NULL means
'no filter'), whereas in the node itself the default namespace is
signalled by nodep->ns being null.
2017-01-02 11:56:37 +00:00
Nikita Popov
bf3ce4db94 Merge branch 'PHP-7.1' 2017-01-01 12:20:52 +01:00
Nikita Popov
2a34042323 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-01 12:20:46 +01:00
dreamszhu
3c977618e1 Fix dom class can't be inherited by the internal class 2017-01-01 12:20:04 +01:00
Joe Watkins
f2eeb47797
Revert "Merge branch 'PHP-7.1'"
This reverts commit 7eac2fdf53, reversing
changes made to 15b80f105c.
2017-01-01 06:53:29 +00:00
Joe Watkins
dbfbe6261d
Revert "Fix dom class can't be inherited by the internal class"
This reverts commit 705f60e481.
2017-01-01 06:52:41 +00:00
Joe Watkins
7eac2fdf53
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix dom class can't be inherited by the internal class
2017-01-01 06:48:24 +00:00
dreamszhu
705f60e481
Fix dom class can't be inherited by the internal class 2017-01-01 06:48:02 +00:00
Kalle Sommer Nielsen
9935d7e163 Save a call to strlen(), since we can figure out the length of this constant value with sizeof() at compile time 2016-10-20 14:28:24 +02:00
Aaron Piotrowski
24237027bc Merge branch 'throw-error-in-extensions' 2016-07-05 02:08:39 -05:00
Dmitry Stogov
0cfb47651c Fixed compilation warnings 2016-06-28 11:37:51 +03:00
Aaron Piotrowski
771e5cc247 Replace zend_ce_error with NULL and replace more E_ERROR with thrown Error 2016-06-13 09:02:17 -05:00
Aaron Piotrowski
e3c681aa5c Merge branch 'master' into throw-error-in-extensions 2016-06-10 22:02:23 -05:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Tom Van Looy
aadb3dd503 These function docs are referencing zend_object_value but this should be zend_object 2015-12-24 10:24:53 +01:00
Dmitry Stogov
51cd49b2cf Cleanup: replace removed condition with ZEND_ASSERT() 2015-09-24 00:25:51 +03:00
Xinchen Hui
c87ef023aa Fixed Bug #70558 ("Couldn't fetch" error in DOMDocument::registerNodeClass()) 2015-09-23 07:01:50 -07:00
Aaron Piotrowski
7ec1e17464 Update memory freeing and other issues, revert some changes 2015-07-05 23:25:53 -05:00
Aaron Piotrowski
907476f34c Convert E_ERROR to thrown Error in extensions 2015-07-05 12:16:57 -05:00
Aaron Piotrowski
ed1b64877d Switch position of ce in exception ce variable names 2015-07-03 09:45:03 -05:00
Aaron Piotrowski
a812a74c2e Change zend_exception_get_default() to zend_exception_ce 2015-07-03 09:44:48 -05:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Anatol Belski
c0adad5557 fix exports and shared compilation 2015-03-23 15:09:07 +01:00
Dmitry Stogov
e10e151e9b Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
2015-02-13 22:20:39 +03:00
Dmitry Stogov
1eb4352143 Use new ZEND_HASH_FOREACH_... API. 2015-02-10 15:43:12 +03:00
Dmitry Stogov
9e70d7672d Move zend_object->guards into additional slot of zend_object->properties_table[]. As result size of objects without __get/__set/__unset/__isset magic methods is reduced. 2015-02-04 15:24:13 +03:00
Dmitry Stogov
3e31838d19 zend_read_property() has to provide a holder for return value.
Previously it was possible that zend_read_property() returned pointer to zval allocated on stack.
2015-01-22 11:50:42 +03:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Nikita Popov
2d212b426a Drop duplicate arg from hash_get_current_key_ex 2014-12-26 21:06:18 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Tjerk Meesters
ea7604fc9e Merge branch 'PHP-5.6'
* PHP-5.6:
  More fixes for nodelist array access
  - testing for null property read
  - no zval copying if the type is already long
  - memory fix for master
  - use zend_long for offset

Conflicts:
	ext/dom/php_dom.c
2014-10-12 12:55:24 +08:00