summaryrefslogtreecommitdiff
path: root/ext/dom/domimplementation.c
diff options
context:
space:
mode:
authorRob Richards <rrichards@php.net>2004-02-15 17:07:34 (GMT)
committerRob Richards <rrichards@php.net>2004-02-15 17:07:34 (GMT)
commitc3a57206cc3ce176befd94865bd078783b9c11b3 (patch)
tree4a409b084b6d9f0fa2afe6b79d1dfb9a5929fb1e /ext/dom/domimplementation.c
parentb59989e716c5661059356f9ea61cda2e5cb22ba2 (diff)
downloadphp-c3a57206cc3ce176befd94865bd078783b9c11b3.tar.gz
allow certain methods to be called statically again:
domdocument (all load methods) domimplementation (all methods) switch to zend_parse_method_parameters for consistancy insure object parameters are correct class types convert zvals to correct type if needed for property writes fix a few segfaults found while testing
Diffstat (limited to 'ext/dom/domimplementation.c')
-rw-r--r--ext/dom/domimplementation.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c
index 13d92ed..c38ca31 100644
--- a/ext/dom/domimplementation.c
+++ b/ext/dom/domimplementation.c
@@ -35,10 +35,10 @@
*/
zend_function_entry php_dom_domimplementation_class_functions[] = {
- PHP_FALIAS(hasFeature, dom_domimplementation_has_feature, NULL)
- PHP_FALIAS(createDocumentType, dom_domimplementation_create_document_type, NULL)
- PHP_FALIAS(createDocument, dom_domimplementation_create_document, NULL)
- PHP_FALIAS(getFeature, dom_domimplementation_get_feature, NULL)
+ PHP_ME(domimplementation, getFeature, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_ME(domimplementation, hasFeature, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_ME(domimplementation, createDocumentType, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
+ PHP_ME(domimplementation, createDocument, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
{NULL, NULL, NULL}
};
@@ -49,7 +49,7 @@ zend_function_entry php_dom_domimplementation_class_functions[] = {
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5CED94D7
Since:
*/
-PHP_FUNCTION(dom_domimplementation_has_feature)
+PHP_METHOD(domimplementation, hasFeature)
{
int feature_len, version_len;
char *feature, *version;
@@ -71,11 +71,11 @@ PHP_FUNCTION(dom_domimplementation_has_feature)
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocType
Since: DOM Level 2
*/
-PHP_FUNCTION(dom_domimplementation_create_document_type)
+PHP_METHOD(domimplementation, createDocumentType)
{
zval *rv = NULL;
xmlDtd *doctype;
- int ret, name_len, publicid_len, systemid_len;
+ int ret, name_len = 0, publicid_len = 0, systemid_len = 0;
char *name, *publicid, *systemid;
xmlChar *pch1 = NULL, *pch2 = NULL, *localname = NULL;
xmlURIPtr uri;
@@ -125,7 +125,7 @@ PHP_FUNCTION(dom_domimplementation_create_document_type)
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocument
Since: DOM Level 2
*/
-PHP_FUNCTION(dom_domimplementation_create_document)
+PHP_METHOD(domimplementation, createDocument)
{
zval *node = NULL, *rv = NULL;
xmlDoc *docp;
@@ -137,7 +137,7 @@ PHP_FUNCTION(dom_domimplementation_create_document)
char *prefix = NULL, *localname = NULL;
dom_object *doctobj;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sso", &uri, &uri_len, &name, &name_len, &node) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ssO", &uri, &uri_len, &name, &name_len, &node, dom_documenttype_class_entry) == FAILURE) {
return;
}
@@ -228,7 +228,7 @@ PHP_FUNCTION(dom_domimplementation_create_document)
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementation3-getFeature
Since: DOM Level 3
*/
-PHP_FUNCTION(dom_domimplementation_get_feature)
+PHP_METHOD(domimplementation, getFeature)
{
DOM_NOT_IMPLEMENTED();
}