Sync (29): msvcrt cpp
Jon Griffiths
jon_p_griffiths at yahoo.com
Fri Aug 15 12:07:18 CDT 2003
Hi,
> Why did you remove all the structure definitions for the derived
> classes? I think it's much clearer to have a separate C type for
> each class instead of having everything be an exception object.
When I first wrote it, I thought so too. But coming back to fix it,
it seemed both needlessly complex and was simply hiding casts (I like
to be able to understand my own code, even if I haven't looked at in
2 years). Each derived class doesn't add any data or define new
methods; they are the same struct, only the vtables differ (and even
then, only for the ctors).
I find this version easier to read and modify, but its your decision
to make. Attached is an updated patch which typedefs the derived
classes so each function takes a distinct type. Hopefully this is an
acceptable compromise.
Cheers,
Jon
Changelog:
+dlls/msvcrt/cpp.c
Use exception as the base for all exception derived classes.
Implement type_info methods correctly.
Add static RTTI for exported objects.
Throw exceptions when run time casts fail.
=====
"Don't wait for the seas to part, or messiahs to come;
Don't you sit around and waste this chance..." - Live
jon_p_griffiths at yahoo.com
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msvcrt_cpp_try2.diff
Type: text/x-diff
Size: 34683 bytes
Desc: msvcrt_cpp_try2.diff
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20030815/998c49f4/msvcrt_cpp_try2.bin
More information about the wine-patches
mailing list