Obsolete OpenJDK 18
[oi-userland.git] / components / developer / openjade / patches / openjade-05-static-iid.patch
blob6e7645a10f933a367328cf3eab636bd153bd0f55
1 Symbols of static variables are deleted from object files and anyway can be replaced by plain static inline calls
3 $ jade
4 ld.so.1: openjade: fatal: relocation error: file /usr/lib/libostyle.so.0: symbol _ZN6OpenSP7LocNode3iidE: referenced symbol not found
5 Killed
7 --- openjade-1.3.2/spgrove/GroveBuilder.cxx.orig
8 +++ openjade-1.3.2/spgrove/GroveBuilder.cxx
9 @@ -5227,7 +5227,7 @@
11 bool BaseNode::queryInterface(IID iid, const void *&p) const
13 - if (iid == LocNode::iid) {
14 + if (iid == LocNode::iid()) {
15 const LocNode *ip = this;
16 p = ip;
17 return 1;
18 --- openjade-1.3.2/spgrove/SdNode.h.orig
19 +++ openjade-1.3.2/spgrove/SdNode.h
20 @@ -26,10 +26,12 @@
21 getSd(ConstPtr<Sd> &sd,
22 ConstPtr<Syntax> &prologSyntax,
23 ConstPtr<Syntax> &instanceSyntax) const = 0;
24 - static const GROVE_NAMESPACE_SCOPE Node::IID iid;
25 + SdNode() = default;
26 + virtual ~SdNode() = default;
27 + static inline const GROVE_NAMESPACE_SCOPE Node::IID iid() { return "SdNode"; }
28 static const SdNode *convert(const GROVE_NAMESPACE_SCOPE NodePtr &nd) {
29 const void *p;
30 - if (nd && nd->queryInterface(iid, p))
31 + if (nd && nd->queryInterface(iid(), p))
32 return (const SdNode *)p;
33 else
34 return 0;
35 --- openjade-1.3.2/spgrove/SdNode.cxx.orig
36 +++ openjade-1.3.2/spgrove/SdNode.cxx
37 @@ -13,8 +13,6 @@
38 using namespace GROVE_NAMESPACE;
39 #endif
41 -const Node::IID SdNode::iid = "SdNode";
43 #ifdef SP_NAMESPACE
45 #endif
46 --- openjade-1.3.2/grove/LocNode.h.orig
47 +++ openjade-1.3.2/grove/LocNode.h
48 @@ -22,10 +22,12 @@
49 class GROVE_API LocNode {
50 public:
51 virtual GROVE_NAMESPACE_SCOPE AccessResult getLocation(Location &) const = 0;
52 - static const GROVE_NAMESPACE_SCOPE Node::IID iid;
53 + LocNode() = default;
54 + virtual ~LocNode() = default;
55 + static inline const GROVE_NAMESPACE_SCOPE Node::IID iid() { return "LocNode"; }
56 static const LocNode *convert(const GROVE_NAMESPACE_SCOPE NodePtr &nd) {
57 const void *p;
58 - if (nd && nd->queryInterface(iid, p))
59 + if (nd && nd->queryInterface(iid(), p))
60 return (const LocNode *)p;
61 else
62 return 0;
63 --- openjade-1.3.2/grove/LocNode.cxx.orig
64 +++ openjade-1.3.2/grove/LocNode.cxx
65 @@ -13,8 +13,6 @@
66 using namespace GROVE_NAMESPACE;
67 #endif
69 -const Node::IID LocNode::iid = "LocNode";
71 #ifdef SP_NAMESPACE
73 #endif