help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] #at:put: with uint shape does not accept all uint


From: Mathieu Suen
Subject: [Help-smalltalk] #at:put: with uint shape does not accept all uint
Date: Sun, 9 Jan 2011 19:38:17 +0100

Hi,

I have a class with a uint as shape:

Object subclass: Foo
[
        <shape:#uint>
        Foo class >> new [
                ^(self new:1)
                        at: 1 put: 16r80000000
        ]
]

Eval [
    
    Foo new.
    
]

This snippet above raise an error:
"Object: Foo new: 1 <0x101327230> error: 
     Invalid argument 2147483648: argument must be between 0 and 4294967295"

I don't know if that make sense but I have fixed it with the following patch:
rev: 
7ccfb10 https://github.com/mathk/smalltalk/commit/7ccfb10

I also have fixed the #at:put: for #int shape in a 32bit arch were it was 
possible to do:
aIntShape at: 1 put: 16r80000000 "Should raise an error"

Since I haven't an 32arch right now I didn't test it.

You can also fetch the test:
rev:
7756fd2 https://github.com/mathk/smalltalk/commit/7756fd2
bf36e41 https://github.com/mathk/smalltalk/commit/bf36e41
4807b3f https://github.com/mathk/smalltalk/commit/4807b3f

HTH

        Mth




__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible 
contre les messages non sollicit├ęs
http://mail.yahoo.fr Yahoo! Mail



reply via email to

[Prev in Thread] Current Thread [Next in Thread]