lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

The think is, FILE* pointers are passed across libraries.
Like posix.fileno, accessing a FILE* created by

On Fri, Nov 26, 2010 at 3:30 PM, GrayFace <> wrote:
> On 26.11.2010 16:54, steve donovan wrote:
>> But, if it calls any C runtime functions, then that runtime's
>> allocator may kick in, and you are back where you started.
>> Most C extensions take the lazy way out and just use malloc (or
>> strdup, etc) - naturally they wish to remain portable!
> If pointers returned by malloc aren't freed by other dlls and things like
> FILE* aren't passed across dll borders, nothing wrong may happen as far as I
> understand. If a dll does pass such stuff around, it won't be usable from
> any language other than C/C++ and would cause all the mentioned problems
> with runtime dlls when used from C/C++. So, in my opinion it's definitely a
> bug, but I'm not a C guy. Personally I prefer to link CRT statically.
> Thanks for the link.
> --
> Best regards,
> Sergey Rozhenko