[midgard-commits] r20212 - trunk/midgard/apis/php5

piotras midgard-commits at lists.midgard-project.org
Tue Jan 20 15:49:40 CET 2009


Author: piotras
Date: Tue Jan 20 15:49:40 2009
New Revision: 20212
URL: http://trac.midgard-project.org/software/changeset/20212

Log:
Set create_object hook explicitly. Fixes "Canary mismatch efree" warning.


Modified:
   trunk/midgard/apis/php5/midgard.c
   trunk/midgard/apis/php5/php_midgard_object.c

Modified: trunk/midgard/apis/php5/midgard.c
==============================================================================
--- trunk/midgard/apis/php5/midgard.c	(original)
+++ trunk/midgard/apis/php5/midgard.c	Tue Jan 20 15:49:40 2009
@@ -411,6 +411,7 @@
 	static zend_class_entry midgard_metadata_class_entry;
 	INIT_CLASS_ENTRY(midgard_metadata_class_entry, "midgard_metadata", NULL);
 	midgard_metadata_class = zend_register_internal_class(&midgard_metadata_class_entry TSRMLS_CC);
+	midgard_metadata_class->create_object = php_midgard_gobject_new;
     
 	/* Register auth type constants */
 	REGISTER_LONG_CONSTANT("MIDGARD_USER_HASH_LEGACY",

Modified: trunk/midgard/apis/php5/php_midgard_object.c
==============================================================================
--- trunk/midgard/apis/php5/php_midgard_object.c	(original)
+++ trunk/midgard/apis/php5/php_midgard_object.c	Tue Jan 20 15:49:40 2009
@@ -349,29 +349,6 @@
 	}
 }
 
-PHP_FUNCTION(_midgard_php_object_get)
-{
-	RETVAL_FALSE;
-	CHECK_MGD;
-	NOT_STATIC_METHOD();
-	zval *zval_object = getThis();
-	
-	if (ZEND_NUM_ARGS() != 0) 
-		return;
-	
-	php_midgard_gobject *php_gobject =
-		(php_midgard_gobject *)zend_object_store_get_object(zval_object TSRMLS_CC);
-	MgdObject *mobj = MIDGARD_OBJECT(php_gobject->gobject);
-	
-	
-	if(mobj) {	
-		
-		midgard_object_get(mobj);
-		if(!php_midgard_error_exception_throw(mgd_handle()))
-			RETVAL_TRUE;
-	}
-}
-
 PHP_FUNCTION(_midgard_php_object_list)
 {
 	RETVAL_FALSE;


More information about the midgard-commits mailing list