[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libredwg] API changes
From: |
gagan |
Subject: |
Re: [libredwg] API changes |
Date: |
Thu, 15 May 2014 22:59:50 +0530 |
On Thu, May 15, 2014 at 6:37 PM, Dave Bender <address@hidden> wrote:
> Just look any accessor function in src/dwg_api.c; they lack return
> statements for the "undefined" case.
>
> Let's take dwg_ent_lwpline_get_elevation
>
> if(lwpline == 0), then the return value of the function is undefined
> behaviour.
> I recommend returning NaN in this case.
Oh Yes! I will be doing that after my "this GSoC period".
> The root problem is, people will be lazy and check the error parameter
> passed in.
Agreed.
> I don't even agree with this error pattern but at this point it's no reason
> to change all your hard work.
Well this was decided by my mentor. He agreed with this way. I will
change it after this GSoC period. No problems :-)
> There is a lot of great stuff in this project and the current problem with
> it is not how the API functions are organized, but a lack of attention to
> the basics (especially the realloc problem...)
Agreed! Yes, I will resolve those segfaults and memory issues.
--
Thanks
Gaganjyot
"Jai Sai Naath"