[Gd-chatter] [Bug 7352] New: copy-bytes is redundantly defined, and arguments are inconsistent

bugzilla-daemon at gwydiondylan.org bugzilla-daemon at gwydiondylan.org
Fri Apr 27 08:08:10 CEST 2007


http://www.gwydiondylan.org/cgi-bin/bugzilla/show_bug.cgi?id=7352

           Summary: copy-bytes is redundantly defined, and arguments are
                    inconsistent
           Product: common
           Version: unspecified
          Platform: Macintosh
        OS/Version: Mac OS
            Status: NEW
          Severity: normal
          Priority: P2
         Component: common-dylan
        AssignedTo: andreas at andreas.org
        ReportedBy: d-j-v at earthlink.net
                CC: gd-chatter at gwydiondylan.org


For GD, copy-bytes methods are defined in three places.

common/common/dylan/byte-vector.dylan
common/io/streams/native-buffer.dylan
d2c/runtime/dylan/buffer.dylan

The files under common implement copy-bytes for the following classes, and take
arguments for the source then the destination.

<sequence> <vector> <string> <byte-vector> <byte-string> <simple-object-vector>
io:streams:<buffer>

Contrariwise, the file under d2c implements copy-bytes for the following
classes, and take arguments for the destination then the source.

<byte-vector> <byte-string> dylan:system:<buffer> <unicode-string>

You'll notice that both sets implement methods for <byte-vector> and
<byte-string>, but these methods take exactly the opposite order of arguments.
I imagine which one you get depends on which library you use. If you use the
common-dylan library and byte-vector module, you get the source-first version,
and if you use the dylan library and system module, you get the dest-first
version.

One argument order or the other should be chosen. GD may or may not be
consistent with OD, but it should at least be consistent within itself. And the
overlapping methods on <byte-vector> and <byte-string> should be removed.

Fixing this will probably also resolve bug #7188.


-- 
Configure bugmail: http://www.gwydiondylan.org/cgi-bin/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the chatter mailing list