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)...
Rob On Sat, Apr 5, 2008 at 6:19 AM, Damien Cassou <[hidden email]> wrote: Hi, _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
>"Rob Rothwell" <[hidden email]> wrote in message
>news:[hidden email]... >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, ClassBuilder-nameinEnvironmentsubclassOftypeinstanceVariableNamesclassVariableNamespoolDictionariescategoryunsafe.st , which, when installed, allows FFI version 3.9.1 to be loaded into the squeak-dev and squeak-web images. Cheers, Andy _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Andrew Tween wrote:
>> "Rob Rothwell" <[hidden email]> wrote in message >> news:[hidden email]... >> 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, > ClassBuilder-nameinEnvironmentsubclassOftypeinstanceVariableNamesclassVariableNamespoolDictionariescategoryunsafe.st > , 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 #doneCompiling. Cheers, - Andreas _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi,
"Andreas Raab" <[hidden email]> wrote in message news:[hidden email]... > Andrew Tween wrote: >>> "Rob Rothwell" <[hidden email]> wrote in message >>> news:[hidden email]... >>> 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, >> ClassBuilder-nameinEnvironmentsubclassOftypeinstanceVariableNamesclassVariableNamespoolDictionariescategoryunsafe.st >> , 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 > #doneCompiling. The only verification I did was to run the Win32 FFI examples and check they work ok. 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. noticeModificationOf: aClass "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 be nil. 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 ;) Cheers, Andy > > Cheers, > - Andreas _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Andrew Tween
Hmm...FFI did indeed appear to load, but my ODBC connection failed to successfully run a query...I got the old "could not coerce arguments error."
Rob On Sun, Apr 6, 2008 at 4:40 AM, Andrew Tween <[hidden email]> wrote: "Rob Rothwell" <[hidden email]> wrote in message news:[hidden email]... _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |