node-memwatch icon indicating copy to clipboard operation
node-memwatch copied to clipboard

remove unnecessary extern c

Open julianduque opened this issue 7 years ago • 1 comments

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)

julianduque avatar Mar 08 '18 03:03 julianduque

FWIW a similar PR was filed against the original node-memwatch @ https://github.com/lloyd/node-memwatch/pull/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

cxreg avatar Mar 12 '18 17:03 cxreg