Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

update signature for Init to align with best practices #7

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

shiftkey
Copy link
Contributor

@shiftkey shiftkey commented Apr 9, 2019

Spotted this one while trying to build against Electron 5.0.0-beta.8 (which is targeting Node 12 that hasn't shipped quite yet):

../src/main.cc:84:6: error: variable has incomplete type 'void'
void Init(Handle<Object> exports) {
     ^
../src/main.cc:84:11: error: use of undeclared identifier 'Handle'
void Init(Handle<Object> exports) {
          ^
../src/main.cc:84:18: error: 'Object' does not refer to a value
void Init(Handle<Object> exports) {
                 ^
/Users/shiftkey/.node-gyp/5.0.0-beta.8/include/node/v8.h:3257:17: note: declared here
class V8_EXPORT Object : public Value {
                ^
../src/main.cc:84:26: error: use of undeclared identifier 'exports'
void Init(Handle<Object> exports) {
                         ^
../src/main.cc:84:34: error: expected ';' after top level declarator
void Init(Handle<Object> exports) {
                                 ^
                                 ;

I borrowed the right signature from keytar, which should work fine for previous versions of V8:

@shiftkey shiftkey merged commit 0b6e7a2 into master Apr 9, 2019
@shiftkey shiftkey deleted the tidy-up-signature-for-electron-5 branch April 9, 2019 19:21
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.

1 participant