Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary extern c #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

julianduque
Copy link

This is causing the following error with certain compilers, removing the extern c fixes the issue.

> require('memwatch-next')
TypeError: magic.upon_gc is not a function
    at Object.<anonymous> (/home/vagrant/node_modules/memwatch-next/include.js:10:7)
    at Module._compile (module.js:629:32)
    at Object.Module._extensions..js (module.js:639:10)
    at Module.load (module.js:546:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:556:17)
    at require (internal/module.js:20:19)
    at repl:1:1
    at sigintHandlersWrap (vm.js:22:35)

@cxreg
Copy link

cxreg commented Mar 12, 2018

FWIW a similar PR was filed against the original node-memwatch @ lloyd#46

This appears to be a compiler specific issue, but there's no reason that this should have ever been extern C to begin with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants