Skip to content
This repository was archived by the owner on Apr 4, 2022. It is now read-only.

Additional Cleanup Following #20#22

Open
brandonlehmann wants to merge 9 commits intotokuhirom:masterfrom
brandonlehmann:additional_cleanup
Open

Additional Cleanup Following #20#22
brandonlehmann wants to merge 9 commits intotokuhirom:masterfrom
brandonlehmann:additional_cleanup

Conversation

@brandonlehmann
Copy link
Copy Markdown
Contributor

  • Incorporated suggestions from @amaranth from (Update to support node 8, 10, 12, and 14 #21) including:
    • Wno-cast-function-type cflag
    • Commented out failing test in 03_instance_method.js until additional investigation can be completed
    • Restored call to InitPerl() in index.js that was mistakenly removed
    • Update to running the tap-based tests upon npm test

@amaranth
Copy link
Copy Markdown

amaranth commented Jun 8, 2020

I'd recommend making these changes as well, to completely clean up the build output:

diff --git a/binding.gyp b/binding.gyp
index f5bea91..4818852 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -20,11 +20,9 @@
       ],
       "cflags!": [
         "-fno-exceptions",
-        "-Wno-literal-suffix"
       ],
       "cflags_cc!": [
         "-fno-exceptions",
-        "-Wno-literal-suffix"
       ],
       "cflags": [
         "<!@(perl -MExtUtils::Embed -e ccopts)",
@@ -32,7 +30,6 @@
         "-Wno-cast-function-type"
       ],
       "ccflags": [
-        "-fno-exceptions",
         "-Wno-literal-suffix"
       ],
       "conditions": [
@@ -68,4 +65,4 @@
       ]
     }
   ]
-}
\ No newline at end of file
+}
diff --git a/package-lock.json b/package-lock.json
index 375caaf..89d0709 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5835,16 +5835,6 @@
         "xmlchars": "^2.2.0"
       }
     },
-    "segfault-handler": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/segfault-handler/-/segfault-handler-1.3.0.tgz",
-      "integrity": "sha512-p7kVHo+4uoYkr0jmIiTBthwV5L2qmWtben/KDunDZ834mbos+tY+iO0//HpAJpOFSQZZ+wxKWuRo4DxV02B7Lg==",
-      "dev": true,
-      "requires": {
-        "bindings": "^1.2.1",
-        "nan": "^2.14.0"
-      }
-    },
     "semver": {
       "version": "6.3.0",
       "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
diff --git a/package.json b/package.json
index ffaf524..fee1786 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,6 @@
     "eslint-plugin-promise": "^4.2.1",
     "eslint-plugin-standard": "^4.0.1",
     "jest": "^26.0.1",
-    "segfault-handler": "^1.3.0",
     "tap": "^14.10.7"
   },
   "scripts": {
diff --git a/src/perl_bindings.cc b/src/perl_bindings.cc
index 8999205..8f0f160 100644
--- a/src/perl_bindings.cc
+++ b/src/perl_bindings.cc
@@ -250,7 +250,7 @@ class NodePerlMethod : public Nan::ObjectWrap, public PerlFoo
 
     std::string name_;
 
-    NodePerlMethod(SV *sv, const char *name, PerlInterpreter *myp): sv_(sv), name_(name), PerlFoo(myp)
+    NodePerlMethod(SV *sv, const char *name, PerlInterpreter *myp): PerlFoo(myp), sv_(sv), name_(name)
     {
         SvREFCNT_inc(sv);
     }
@@ -417,7 +417,7 @@ class NodePerlObject : public Nan::ObjectWrap, public PerlFoo
         return scope.Escape(retval);
     }
 
-    NodePerlObject(SV *sv, PerlInterpreter *myp): sv_(sv), PerlFoo(myp)
+    NodePerlObject(SV *sv, PerlInterpreter *myp): PerlFoo(myp), sv_(sv)
     {
         SvREFCNT_inc(sv);
     }
@@ -671,10 +671,7 @@ class NodePerl : public Nan::ObjectWrap, public PerlFoo
   private:
     void destroy()
     {
-        NodePerl *nodePerl = this;
-
         this->persistent().Reset();
-
         this->~NodePerl();
     }
 

@brandonlehmann
Copy link
Copy Markdown
Contributor Author

@amaranth If you want to submit a PR to https://github.com/brandonlehmann/node-perl/tree/additional_cleanup I'll merge it in so it gets included.

@brandonlehmann
Copy link
Copy Markdown
Contributor Author

Thanks @amaranth I've merged it into my branch so it's reflected here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants