[Seaside] Re: [ANN][Squeak-dev Images] April 2008 versions
amtween at hotmail.com
Sun Apr 6 10:03:53 UTC 2008
"Andreas Raab" <andreas.raab at gmx.de> wrote in message
news:47F890DC.2080203 at gmx.de...
> Andrew Tween wrote:
>>> "Rob Rothwell" <r.j.rothwell at gmail.com> wrote in message
>>> news:22f158f00804050827y254789fbjb8aac633a782acc4 at mail.gmail.com...
>>> This would be great, but I really need FFI for ODBC, and I just can't
>>> get it to load into this image (3.10-7159)...
>> please see - http://bugs.squeak.org/view.php?id=6952
>> There you will find a patch,
>> , which, when installed, allows FFI version 3.9.1 to be loaded into the
>> squeak-dev and squeak-web images.
> Did you verify whether the result is correct? It is very easy to screw up
> the FFI and the result of those screwups are random crashes in the calls.
> I'm somewhat suspicious about that workaround because I don't see where
> ExternalType>>StructTypes would get installed if it isn't from
The only verification I did was to run the Win32 FFI examples and check they
They way I understand it, StructTypes is initialized by the initialize
methods, not by doneCompiling.
doneCompiling calls ExternalType class>>noticeModificationOf: , which
modifies the existing elements of StructTypes, but doesn't add any new ones.
My patch causes the loader to ignore errors in noticeModificationOf: caused
by StructTypes being nil.
Later on, StructTypes is initialized to some kind of Dictionary, and
noticeModificationOf: no longer causes any errors.
I think that modifying ExternalType class>>noticeModificationOf: so that it
does nothing if StructTypes is nil would have the same effect and solve the
problem in much the same way. i.e.
"A subclass of ExternalStructure has been redefined.
Clean out any obsolete references to its type."
| type |
StructTypes isNil ifTrue:[^self].
There is no value in setting StructTypes to a Dictionary at this point since
we know that a future initialize will overwrite it with an empty Dictionary.
And we know that that intialize hasn't already run, or StructTypes wouldn't
And we know that nothing has tried to add an entry to StructTypes, or a
different error would have occured during loading.
Having said all that, I could easily be missing something here, and you are
right to be suspicious ;)
> - Andreas
More information about the seaside