Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap.GetEndian() breaks code #1180

Open
mikanystrom opened this issue Jun 2, 2024 · 1 comment
Open

Swap.GetEndian() breaks code #1180

mikanystrom opened this issue Jun 2, 2024 · 1 comment

Comments

@mikanystrom
Copy link
Contributor

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>?

@VictorMiasnikov
Copy link
Contributor

Why not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants