[MPlayer-cvslog] r36904 - trunk/stream/vcd_read_os2.h

KO Myung-Hun komh78 at gmail.com
Mon Feb 24 00:39:44 CET 2014



Reimar Döffinger wrote:
> On 23 February 2014 15:35:31 CET, komh <subversion at mplayerhq.hu> wrote:
>> Author: komh
>> Date: Sun Feb 23 15:35:30 2014
>> New Revision: 36904
>>
>> Log:
>> vcd_read_os2.h: replace calloc() with _calloc() only in vcd_read_os2.h
> 
> I meant: why use a define at all?

I don't want to change the previous codes. And I don't want to use
#ifdef whenever finding calloc(). Although there is only one calloc()
this case.

> I don't think there is any guarantee that it is safe to override calloc via a define at all, plus defines have loads of issues.

In this case, what problems does define has ? And _lcalloc() should be
identical to calloc() except that it should allocate a memory in a low
memory pool not in a any memory pool including a high memory.

> Why not just put an ifdef around the only calloc that causes issues?

Said above.

> That is, unless you want to go even further and remove the sector data array completely from the context and just put in on the stack in the read function, then you'd need no ifdef at all (but should add a comment why)

This was a way of my solutions. But, IIRC, you didn't like the sector
data array in the stack when reviewing these codes. BTW now you are
asking to do so. Hmm....

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.28 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr



More information about the MPlayer-cvslog mailing list