[Glass] How to properly write bytes objects into binary streams?

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Wed Sep 3 11:48:56 PDT 2014


Take a look at Integer class>>_new:neg: ... the implication is that you
might need to store "digits" instead of bytes ....

Dale


On Wed, Sep 3, 2014 at 11:43 AM, Mariano Martinez Peck via Glass <
glass at lists.gemtalksystems.com> wrote:

>
>
>
> On Wed, Sep 3, 2014 at 1:12 PM, Martin McClure <
> martin.mcclure at gemtalksystems.com> wrote:
>
>> On 09/03/2014 06:58 AM, Mariano Martinez Peck wrote:
>>
>>>
>>>
>> [...]
>>
>>
>>
>>> But again, I want to go step by step.
>>>
>>>     If the answer to either of these is "yes," then things get a bit
>>>     more complicated.
>>>
>>>
>>> Even if they would be desired later, right now, I am fine with a "No"
>>> answer.
>>>
>>>
>> OK, for the limited gs-to-gs case, same endianness...
>>
>> Since in GemStone #replaceFrom:to:with: expects to be copying from a
>> collection, not (for instance) a LargeInteger, the most generic way to copy
>> the bytes of a byte object is probably to write a loop that uses
>> #_basicSize and #_basicAt: to access the bytes.
>>
>
> OK. Thanks. But then how can I create an empty instance of one of them, in
> a general way, and with a certain size? I tried:
>
> LargeInteger _basicNew: 10
>
> But it fails.
>
> Thanks,
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140903/ede34c0c/attachment.html>


More information about the Glass mailing list