Issue status update for http://smalltalk.gnu.org/node/148 Post a follow up: http://smalltalk.gnu.org/project/comments/add/148

Project:      GNU Smalltalk
Version:      <none>
Component:    Base classes
Category:     bug reports
Priority:     normal
Assigned to:  Unassigned
Reported by:  tonyg
Updated by:   tonyg
Status:       active
Attachment:   http://smalltalk.gnu.org/files/issues/ctype.patch (643 bytes)

Given a CStruct #StructA with a member #b of type (#ptr #StructB), I was
expecting to be able to call

st> myA b
CPtr(16r80728C4)

as well as

st> myA b value
StructB(16r80728D0)

However, what I actually get is:

st> myA b value
Object: CPtr new: 1 "<0x40338b18>" error: Invalid argument StructB
SystemExceptions.WrongClass(Exception)>>signal
SystemExceptions.WrongClass class(SystemExceptions.InvalidValue
class)>>signalOn:
CPtr(CObject)>>derefAt:type:
CPtr>>value
UndefinedObject>>executeStatements
nil

The fault is in CType>>#storeOn: and CType class>>#from:. The #storeOn:
method prints the raw cObjectType instance variable, where it should
print "self cObjectType" instead; and #from: returns a class,
(Namespace current at: type), where it should return the class's type,
((Namespace current at: type) type).

Patch against gst 2.95h attached. Test case to follow.




_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to