Closed Bug 1656379 Opened 4 years ago Closed 4 years ago

Rename nsCUPSShim function pointers

Categories

(Core :: Printing: Setup, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: nordzilla, Assigned: nordzilla)

References

Details

(Whiteboard: [print2020_v81])

Attachments

(1 file)

Currently, all of the nsCUPSShim function pointers have the leading m on their name.

This is not necessary, and removing this will simplify the verification and usage of these functions.

Whiteboard: [print2020_v81]
Blocks: 1656384
Pushed by abutkovits@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/670195cb59f8
Rename nsCUPSShim function pointers r=AlaskanEmily,jwatt
Backout by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9950354e1a38
Backed out 2 changesets (bug 1656379, bug 1656587) for linux Hazard bustages.

Apparently there are some C++ compilers that have an issue with, for example:

void foo(int) {}

class bar {
  decltype(foo)* foo;
};

Other compilers (such as the ones I tested with) do not.

So to avoid this inconsistency in compilers, we're going to have to be explicit about the global scope.

To fix the example, this would mean:

  decltype(::foo)* foo;

To fix this code, we'll have to change the declaration macro from

#define CUPS_SHIM_FUNC_DECL(X) decltype(X)* X;

to

#define CUPS_SHIM_FUNC_DECL(X) decltype(::X)* X;

so that we are explicit about decltypeing from the globally scoped function that exists in cups.h

I believe that should fix the issue.

Flags: needinfo?(enordin)
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/960da8c9a54f
Rename nsCUPSShim function pointers r=AlaskanEmily,jwatt
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: