8000 Swap.GetEndian() breaks code · Issue #1180 · modula3/cm3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Swap.GetEndian() breaks code #1180
Open
@mikanystrom

Description

@mikanystrom

Hi everyone,

This change...

scc406110> pwd
/nfs/site/disks/zsc9_fwr_lib_char_008/mnystroe/cm3-fork/m3-libs/m3core/src/swap
scc406110> git blame Swap.i3
cfac2c7 m3-libs/libm3/src/uid/Common/Swap.i3 (Olaf Wagner 2001-01-24 12:24:49 +0000 1) (* Copyright (C) 1989, Digital Equipment Corporation *)
...
cfac2c7 m3-libs/libm3/src/uid/Common/Swap.i3 (Olaf Wagner 2001-01-24 12:24:49 +0000 12) TYPE Endian = {Big, Little};
cfac2c7 m3-libs/libm3/src/uid/Common/Swap.i3 (Olaf Wagner 2001-01-24 12:24:49 +0000 13)
50f54fc m3-libs/m3core/src/swap/Swap.i3 (Jay Krell 2022-03-07 03:30:45 -0800 14) PROCEDURE GetEndian(): Endian;
cfac2c7 m3-libs/libm3/src/uid/Common/Swap.i3 (Olaf Wagner 2001-01-24 12:24:49 +0000 15)

breaks existing code.

Yes, I realize that the old way, the global variable "endian", is not ideal.

But the standard installation of Modula-3 at Intel has it, and there's code around that uses it. (Specifically, the rdwr library, but maybe others too.)

The interface also moved...I think that's less of a problem since most programs will pull in libm3 and m3core and at least can be made to work with either version. But deleting "endian" is a problem.

What problem did this solve?

The implementation of GetEndian is

PROCEDURE GetEndian(): Endian =
BEGIN
RETURN endian;
END GetEndian;

so "endian" is still there.

Would anyone mind if I change it so that "endian" is back to being visible in the interface, but marked <OBSOLETE>?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0