Closed Bug 293 Opened 26 years ago Closed 26 years ago

Source redefines PI in dom/public/coreDom/nsIDOMNode.h

Categories

(MozillaClassic Graveyard :: Compositor Library, defect, P3)

1998-04-08
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bg2k, Assigned: vidur)

Details

Created by Brian Grunkemeyer (bg2k@cmu.edu) on Sunday, May 3, 1998 2:02:32 AM PDT
Additional Details :
PI is used in an enum internally in
dom/public/coreDom/nsIDOMNode.h.  It's set to some number
(4), but since the preprocessor expands it before it can be
assigned, you end up with something approximating this:

enum { 3.14159L = 4 };

That isn't right.  I got around it by undefining PI in the
file immediately before this, but that isn't the right thing
to do either.  Change the name from PI to something other
than a commonly used mathematical constant.  Besides, I have
no idea what a "PI" node is from the name - it's a ****
name or abbreviation.

The errant code is around line 44:

class nsIDOMNode : public nsISupports {
public:
  // NodeType
  enum NodeType {
    DOCUMENT             = 1,
    ELEMENT              = 2,
    ATTRIBUTE            = 3,
    PI                   = 4, <<--------------
    COMMENT              = 5,
    TEXT                 = 6
  };

  ...
};
Updated by   (toshok@netscape.com) on Monday, May 18, 1998 11:38:43 AM PDT
Additional Details :
vidur?
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
The name of the enum has been changed to PROCESSING_INSTRUCTION as per the W3C
spec.
QA Contact: 4015
qa contact set to gerardok@netscape.com for verify against new code base
Status: RESOLVED → VERIFIED
Verified on 3/25 source file.
You need to log in before you can comment on or make changes to this bug.