This is a refactoring that came out while looking at GDBM conversion.
The root problem is that there are forward references to a class in a
<cCall: ...> pragma. In the conversion of GDBM, we get
Object subclass: GDBM [
... [
<cCall: ... returning: DatumStruct type>
]
CStruct subclass: DatumStruct [
]
Pragma arguments are evaluated at compile-time, which breaks horribly
because DatumStruct is still undefined (and hence nil).
Now I'm tempted to break source-code compatibility. How?
1) Requiring DatumStruct to come first is not possible, because of
possible circular references. (It would work in this case though).
2) Changing "DatumStruct type" to "#{DatumStruct}" seems like a good
idea anyway. It would match the way types are referenced in CStructs,
and likewise, we could allow #(#ptr #{DatumStruct}) etc. Do you people
agree?
It would also be possible to add a hack into scripts/Convert.st in some
way to rewrite "DatumStruct type" into "#{DatumStruct}".
If anybody has an idea how to avoid this, please shoot.
Paolo
* looking for [EMAIL PROTECTED]/smalltalk--devo--2.2--patch-512 to compare with
* auto-adding [EMAIL PROTECTED]/smalltalk--devo--2.2--patch-512 to greedy
revision library /Users/bonzinip/Archives/revlib
* found immediate ancestor revision in library ([EMAIL
PROTECTED]/smalltalk--devo--2.2--patch-511)
* patching for this revision ([EMAIL PROTECTED]/smalltalk--devo--2.2--patch-512)
* comparing to [EMAIL PROTECTED]/smalltalk--devo--2.2--patch-512
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk