Re: [E-devel] Evas bugger

2009-08-24 Thread Christopher Michael
Christopher Michael wrote:
 Looking through some code, I stumbled upon this which doesn't seem right:
 
 EAPI Evas *
 evas_object_evas_get(const Evas_Object *obj)
 {
 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
 return NULL;
 MAGIC_CHECK_END();
 if (obj-delete_me) return 0;
 return obj-layer-evas;
 }
 
 Shouldn't that be:
 if (obj-delete_me) return NULL;
 
 ??
 
 dh

OR even:

  MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
  return 0;
  MAGIC_CHECK_END();

?? dh


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas bugger

2009-08-24 Thread Mikhail Gusarov

Twas brillig at 06:28:41 24.08.2009 UTC-04 when cpmicha...@comcast.net did gyre 
and gimble:

 CM if (obj-delete_me) return 0;

 CM Shouldn't that be:
 CM if (obj-delete_me) return NULL;

./linux/stddef.h:#define NULL 0

-- 
  http://fossarchy.blogspot.com/


pgpxxDGlAnKXA.pgp
Description: PGP signature
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas bugger

2009-08-24 Thread Vincent Torri


On Mon, 24 Aug 2009, Christopher Michael wrote:

 Christopher Michael wrote:
 Looking through some code, I stumbled upon this which doesn't seem right:

 EAPI Evas *
 evas_object_evas_get(const Evas_Object *obj)
 {
 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
 return NULL;
 MAGIC_CHECK_END();
 if (obj-delete_me) return 0;
 return obj-layer-evas;
 }

 Shouldn't that be:
 if (obj-delete_me) return NULL;

 ??

 dh

 OR even:

  MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
  return 0;
  MAGIC_CHECK_END();

to be consistent, return NULL on both. Technically, NULL is 0, like its 
name says.

Vincent

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas bugger

2009-08-24 Thread Christopher Michael
Christopher Michael wrote:
 Christopher Michael wrote:
 Looking through some code, I stumbled upon this which doesn't seem right:

 EAPI Evas *
 evas_object_evas_get(const Evas_Object *obj)
 {
 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
 return NULL;
 MAGIC_CHECK_END();
 if (obj-delete_me) return 0;
 return obj-layer-evas;
 }

 Shouldn't that be:
 if (obj-delete_me) return NULL;

 ??

 dh
 
 OR even:
 
   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
   return 0;
   MAGIC_CHECK_END();
 
 ?? dh
 
Eh, scratch that last one...IMO, should be:
   if (obj-delete_me) return NULL;

dh



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas bugger

2009-08-24 Thread Christopher Michael
Vincent Torri wrote:
 
 
 On Mon, 24 Aug 2009, Christopher Michael wrote:
 
 Christopher Michael wrote:
 Looking through some code, I stumbled upon this which doesn't seem 
 right:

 EAPI Evas *
 evas_object_evas_get(const Evas_Object *obj)
 {
 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
 return NULL;
 MAGIC_CHECK_END();
 if (obj-delete_me) return 0;
 return obj-layer-evas;
 }

 Shouldn't that be:
 if (obj-delete_me) return NULL;

 ??

 dh

 OR even:

  MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
  return 0;
  MAGIC_CHECK_END();
 
 to be consistent, return NULL on both. Technically, NULL is 0, like its 
 name says.
 
 Vincent
 
Yea, just seemed an inconsistency, that's all :)

I'll make the change.

Thanks Vince :)

dh


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas bugger

2009-08-24 Thread Christopher Michael
Mikhail Gusarov wrote:
 Twas brillig at 06:28:41 24.08.2009 UTC-04 when cpmicha...@comcast.net did 
 gyre and gimble:
 
  CM if (obj-delete_me) return 0;
 
  CM Shouldn't that be:
  CM if (obj-delete_me) return NULL;
 
 ./linux/stddef.h:#define NULL 0
 
And if we're not on linux ?? :)

IMO, those should be consistent (which they are now, thanks Vincent), so 
that regardless of platform the returns are as expected.

dh

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas bugger

2009-08-24 Thread Mikhail Gusarov

Twas brillig at 06:55:12 24.08.2009 UTC-04 when cpmicha...@comcast.net did gyre 
and gimble:

 CM regardless of platform the returns are as expected.

NULL is declared as 0 in C standard. Consistency wins, I agree, but
portability is not hurt by using 0 instead of NULL.

-- 
  http://fossarchy.blogspot.com/


pgpwsY3mryuE3.pgp
Description: PGP signature
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas bugger

2009-08-24 Thread Albin Tonnerre
On Mon, Aug 24, 2009 at 06:07:20PM +0700, Mikhail Gusarov wrote :
 
 Twas brillig at 06:55:12 24.08.2009 UTC-04 when cpmicha...@comcast.net did 
 gyre and gimble:
 
  CM regardless of platform the returns are as expected.
 
 NULL is declared as 0 in C standard. Consistency wins, I agree, but
 portability is not hurt by using 0 instead of NULL.

IIRC a conformant C implementation could define NULL to (void *) 0

Regards,
-- 
Albin Tonnerre


signature.asc
Description: Digital signature
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel