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
Open
Conversation
…ng that out)
…anges and additional investigation is required (TODO added per @amaranth)
|
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();
}
|
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. |
Contributor
Author
|
Thanks @amaranth I've merged it into my branch so it's reflected here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wno-cast-function-typecflag03_instance_method.jsuntil additional investigation can be completedInitPerl()inindex.jsthat was mistakenly removednpm test