passing NULL to a free function is not an error case. if it were, then free(NULL) would crash.
On Wed, Oct 3, 2012 at 12:59 PM, Tom Hacohen <tom.haco...@samsung.com>wrote: > I agree with Gustavo. This is as obviously an error case, and errors > should be printed as such. It's not a convenience like making free check > for NULL, as deleting objects has more meaning than just freeing memory. > > I think one of the best improvements I've ever did to Evas was turning > magic/null bitching on for everything, it's just makes finding bugs > easier, and doesn't let you sweep your errors under the rug. > > -- > Tom. > > On 03/10/12 13:53, Gustavo Sverzut Barbieri wrote: > > Bad commit. > > > > At least if EVAS_MAGIC_SOMETHING variable is set we should bitch so we > can > > debug these errors > > > > On Wednesday, October 3, 2012, Enlightenment SVN wrote: > > > >> Log: > >> probably the best commit I'll ever make: evas_object_del() now takes > NULL > >> parameter without bitching > >> > >> > >> Author: discomfitor > >> Date: 2012-10-02 23:59:20 -0700 (Tue, 02 Oct 2012) > >> New Revision: 77344 > >> Trac: http://trac.enlightenment.org/e/changeset/77344 > >> > >> Modified: > >> trunk/evas/ChangeLog trunk/evas/NEWS > >> trunk/evas/src/lib/canvas/evas_object_main.c > >> > >> Modified: trunk/evas/ChangeLog > >> =================================================================== > >> --- trunk/evas/ChangeLog 2012-10-03 06:41:32 UTC (rev 77343) > >> +++ trunk/evas/ChangeLog 2012-10-03 06:59:20 UTC (rev 77344) > >> @@ -1067,3 +1067,7 @@ > >> > >> * Add the object display mode hint. this can be used to check > >> object > >> mode like compress or expand or etc > >> + > >> +2012-10-03 Mike Blumenkrantz > >> + > >> + * evas_object_del() now accepts NULL more peacefully > >> > >> Modified: trunk/evas/NEWS > >> =================================================================== > >> --- trunk/evas/NEWS 2012-10-03 06:41:32 UTC (rev 77343) > >> +++ trunk/evas/NEWS 2012-10-03 06:59:20 UTC (rev 77344) > >> @@ -14,7 +14,8 @@ > >> > >> * Function to rotate an evas map with a quaternion: > >> evas_map_util_quat_rotate(). > >> * EVAS_GL_NO_BLACKLIST env var to turn off blacklisted drivers in > gl > >> - * Evas gl enigne can do partial swaps now. > >> + * Evas gl engine can do partial swaps now. > >> + * evas_object_del() now takes NULL parameters > >> > >> Fixes: > >> > >> > >> Modified: trunk/evas/src/lib/canvas/evas_object_main.c > >> =================================================================== > >> --- trunk/evas/src/lib/canvas/evas_object_main.c 2012-10-03 > >> 06:41:32 UTC (rev 77343) > >> +++ trunk/evas/src/lib/canvas/evas_object_main.c 2012-10-03 > >> 06:59:20 UTC (rev 77344) > >> @@ -430,6 +430,7 @@ > >> EAPI void > >> evas_object_del(Evas_Object *obj) > >> { > >> + if (!obj) return; > >> MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); > >> return; > >> MAGIC_CHECK_END(); > >> > >> > >> > >> > ------------------------------------------------------------------------------ > >> Don't let slow site performance ruin your business. Deploy New Relic APM > >> Deploy New Relic app performance management and know exactly > >> what is happening inside your Ruby, Python, PHP, Java, and .NET app > >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! > >> http://p.sf.net/sfu/newrelic-dev2dev > >> _______________________________________________ > >> enlightenment-svn mailing list > >> enlightenment-...@lists.sourceforge.net <javascript:;> > >> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > >> > > > > > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel