[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Question] using Map, setCompareFunction, ordering lists
From: |
Marcus G. Daniels |
Subject: |
Re: [Question] using Map, setCompareFunction, ordering lists |
Date: |
15 Jun 1999 08:51:51 -0700 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.3.10 |
NEN> The problem is that I am getting a segmentation fault in [c1 getPrice],
NEN> when sellList contains already one element.
Are you using objects or integers as your Map key?
If you want to use integers as your Map key, it's necessary to coerce
the type back to an integer (the compare function wants generic
objects as arguments). That only works because integers and ids are
typically the same size on most systems. I don't recommend doing
this -- I think it is better to use objects for everything.
Like this:
out1 = (int) c1;
out2 = (int) c2;
instead of:
out1 = [c1 getPrice];
out2 = [c2 getPrice];
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- Re: [Question] using Map, setCompareFunction, ordering lists,
Marcus G. Daniels <=