On 08/10/2011 20:02, My Th wrote:
> S , 2011-10-08 14:26 -0400, Geoff Hutchison rakstīja:
>>> As far as I know it should not break binary compatibility, but I
>> might>  be wrong.>  >  I hope this change gets in eventually in one form
>> or another.
>>
>> The change is a good one and it will eventually go in -- I'd be OK to
>> apply it to SVN trunk when Chris has a chance to look at it. (The
>> loading on Windows is a little different from Mac/Linux/UNIX and so I'd
>> want verification that it works on Windows.)
>>
>> I'm generally conservative about contributed patches to the main
>> library for "point releases" like 2.3.1. Applying it to trunk means it
>> would be in line for a future 2.4 release.
>>
>> As another example, there's an InChI v1.0.4 released recently, and I
>> haven't applied that for the trunk, or for 2.3.1.
>>
>> -Geoff
>
> I can understand that. I'm also more comfortable if my patches get
> reviewed by someone, thats why I'm posting them in patch tracker. Only
> sometimes it looks like they are forgotten there. And besides that, OB
> release cycle is rather long.
>
> I have no idea how Windows dll loading works, but the code I touched
> should be above the platform specific bits. I used the same semantics as
> the old code had, only moved it to a place trough which goes all code
> paths of the library which touch plugins.
>
> It might be that the changes could be implemented in other place which
> would shrink the patch size, but I don't know the OB code that well, so
> I went for the most straightforward solution.

Could a single line
   static int n = LoadAllPlugins();
in the function OBPlugin::PluginMap() replace all the other calls?
The local static variable n would be initialized once on first use, but 
not subsequently used.

I'm impressed that you took the trouble to understand the OBPlugin code. 
In the hybrid systems Cygwin and Mingw32 the plugins were originally not 
being loaded. Tim Vandermeersch made some changes which fixed this, but 
it would be helpful, if you are interested, in explaining how they work. 
(The OBPlugin code is a bit obscure; I can understand why macros are 
considered evil, http://www.parashift.com/c++-faq-lite )

Chris

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to