Elizabeth Marie Smith
2012-07-17 13:48:46 UTC
Commit: d06019f07812c5e53982e6e6c960745ee605287e
Author: Elizabeth M Smith <***@gmail.com> Tue, 17 Jul 2012 09:48:46 -0400
Parents: 0d19d4e184af36f08dfacdc41f342d1a3ff74c10
Branches: master
Link: http://git.php.net/?p=php/gtk-src.git;a=commitdiff;h=d06019f07812c5e53982e6e6c960745ee605287e
Log:
ecalloc all the structs
Changed paths:
M ext/gtk+/php_gtk+_types.c
M main/php_gtk_object.c
M main/phpg_atom.c
M main/phpg_paramspec.c
Diff:
diff --git a/ext/gtk+/php_gtk+_types.c b/ext/gtk+/php_gtk+_types.c
index 0a7baf8..8f708b1 100644
--- a/ext/gtk+/php_gtk+_types.c
+++ b/ext/gtk+/php_gtk+_types.c
@@ -740,8 +740,7 @@ static zend_object_value phpg_modelrow_create_object(zend_class_entry *ce TSRMLS
zend_object_value zov;
phpg_modelrow_t *object;
- object = emalloc(sizeof(phpg_modelrow_t));
- memset(object, 0, sizeof(phpg_modelrow_t));
+ object = ecalloc(1, sizeof(phpg_modelrow_t));
phpg_init_object(object, ce TSRMLS_CC);
zov.handlers = >ktreemodelrow_handlers;
@@ -800,8 +799,8 @@ static zend_object_value phpg_modelrowiter_create_object(zend_class_entry *ce TS
zend_object_value zov;
phpg_modelrowiter_t *object;
- object = emalloc(sizeof(phpg_modelrowiter_t));
- memset(object, 0, sizeof(phpg_modelrowiter_t));
+ object = ecalloc(1, sizeof(phpg_modelrowiter_t));
+
phpg_init_object(object, ce TSRMLS_CC);
zov.handlers = &php_gtk_handlers;
diff --git a/main/php_gtk_object.c b/main/php_gtk_object.c
index f408164..007bff9 100644
--- a/main/php_gtk_object.c
+++ b/main/php_gtk_object.c
@@ -94,7 +94,7 @@ static zend_object_value phpg_create_object(zend_class_entry *ce TSRMLS_DC)
phpg_gobject_t *object;
prop_desc_t *prop_desc;
- object = emalloc(sizeof(phpg_gobject_t));
+ object = ecalloc(1, sizeof(phpg_gobject_t));
phpg_init_object(object, ce TSRMLS_CC);
object->obj = NULL;
object->dtor = NULL;
diff --git a/main/phpg_atom.c b/main/phpg_atom.c
index 7ecf476..7913ec7 100644
--- a/main/phpg_atom.c
+++ b/main/phpg_atom.c
@@ -119,7 +119,7 @@ PHP_GTK_API zend_object_value phpg_create_gdkatom(zend_class_entry *ce TSRMLS_DC
zend_object_value zov;
phpg_gdkatom_t *object;
- object = emalloc(sizeof(phpg_gdkatom_t));
+ object = ecalloc(1, sizeof(phpg_gdkatom_t));
phpg_init_object(object, ce TSRMLS_CC);
object->atom = GDK_NONE;
diff --git a/main/phpg_paramspec.c b/main/phpg_paramspec.c
index 93614e2..f087464 100644
--- a/main/phpg_paramspec.c
+++ b/main/phpg_paramspec.c
@@ -43,8 +43,8 @@ PHP_GTK_API zend_object_value phpg_create_paramspec(zend_class_entry *ce TSRMLS_
zend_object_value zov;
phpg_paramspec_t *object;
- object = emalloc(sizeof(phpg_paramspec_t));
- phpg_init_object(object, ce TSRMLS_CC);
+ object = ecalloc(1, sizeof(phpg_paramspec_t));
+ phpg_init_object(object, ce TSRMLS_CC);
object->pspec = NULL;
Author: Elizabeth M Smith <***@gmail.com> Tue, 17 Jul 2012 09:48:46 -0400
Parents: 0d19d4e184af36f08dfacdc41f342d1a3ff74c10
Branches: master
Link: http://git.php.net/?p=php/gtk-src.git;a=commitdiff;h=d06019f07812c5e53982e6e6c960745ee605287e
Log:
ecalloc all the structs
Changed paths:
M ext/gtk+/php_gtk+_types.c
M main/php_gtk_object.c
M main/phpg_atom.c
M main/phpg_paramspec.c
Diff:
diff --git a/ext/gtk+/php_gtk+_types.c b/ext/gtk+/php_gtk+_types.c
index 0a7baf8..8f708b1 100644
--- a/ext/gtk+/php_gtk+_types.c
+++ b/ext/gtk+/php_gtk+_types.c
@@ -740,8 +740,7 @@ static zend_object_value phpg_modelrow_create_object(zend_class_entry *ce TSRMLS
zend_object_value zov;
phpg_modelrow_t *object;
- object = emalloc(sizeof(phpg_modelrow_t));
- memset(object, 0, sizeof(phpg_modelrow_t));
+ object = ecalloc(1, sizeof(phpg_modelrow_t));
phpg_init_object(object, ce TSRMLS_CC);
zov.handlers = >ktreemodelrow_handlers;
@@ -800,8 +799,8 @@ static zend_object_value phpg_modelrowiter_create_object(zend_class_entry *ce TS
zend_object_value zov;
phpg_modelrowiter_t *object;
- object = emalloc(sizeof(phpg_modelrowiter_t));
- memset(object, 0, sizeof(phpg_modelrowiter_t));
+ object = ecalloc(1, sizeof(phpg_modelrowiter_t));
+
phpg_init_object(object, ce TSRMLS_CC);
zov.handlers = &php_gtk_handlers;
diff --git a/main/php_gtk_object.c b/main/php_gtk_object.c
index f408164..007bff9 100644
--- a/main/php_gtk_object.c
+++ b/main/php_gtk_object.c
@@ -94,7 +94,7 @@ static zend_object_value phpg_create_object(zend_class_entry *ce TSRMLS_DC)
phpg_gobject_t *object;
prop_desc_t *prop_desc;
- object = emalloc(sizeof(phpg_gobject_t));
+ object = ecalloc(1, sizeof(phpg_gobject_t));
phpg_init_object(object, ce TSRMLS_CC);
object->obj = NULL;
object->dtor = NULL;
diff --git a/main/phpg_atom.c b/main/phpg_atom.c
index 7ecf476..7913ec7 100644
--- a/main/phpg_atom.c
+++ b/main/phpg_atom.c
@@ -119,7 +119,7 @@ PHP_GTK_API zend_object_value phpg_create_gdkatom(zend_class_entry *ce TSRMLS_DC
zend_object_value zov;
phpg_gdkatom_t *object;
- object = emalloc(sizeof(phpg_gdkatom_t));
+ object = ecalloc(1, sizeof(phpg_gdkatom_t));
phpg_init_object(object, ce TSRMLS_CC);
object->atom = GDK_NONE;
diff --git a/main/phpg_paramspec.c b/main/phpg_paramspec.c
index 93614e2..f087464 100644
--- a/main/phpg_paramspec.c
+++ b/main/phpg_paramspec.c
@@ -43,8 +43,8 @@ PHP_GTK_API zend_object_value phpg_create_paramspec(zend_class_entry *ce TSRMLS_
zend_object_value zov;
phpg_paramspec_t *object;
- object = emalloc(sizeof(phpg_paramspec_t));
- phpg_init_object(object, ce TSRMLS_CC);
+ object = ecalloc(1, sizeof(phpg_paramspec_t));
+ phpg_init_object(object, ce TSRMLS_CC);
object->pspec = NULL;
--
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php