TooTallNate / node-lame

Node.js native bindings to libmp3lame & libmpg123
MIT License
567 stars 113 forks source link

use uint32_t instead of size_t for nan #46

Closed willrnch closed 9 years ago

willrnch commented 9 years ago

On Mac OS X (10.10.2) (LLVM 6.0), I get this error at compilation:

../node_modules/nan/nan_new.h:209:10: error: call to 'New' is ambiguous
  return NanIntern::Factory<T>::New(arg0);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/node_lame.cc:395:3: note: in instantiation of function template specialization 'NanNew<v8::Integer, unsigned long>' requested
      here
  SIZEOF(short);
  ^
../src/node_lame.cc:393:54: note: expanded from macro 'SIZEOF'
  target->ForceSet(NanNew<String>("sizeof_" #value), NanNew<Integer>(sizeof(value)), \
                                                     ^
../node_modules/nan/nan_new.h:109:26: note: candidate function
  static inline return_t New(int32_t value);
                         ^
../node_modules/nan/nan_new.h:110:26: note: candidate function
  static inline return_t New(uint32_t value);

It's caused by passing a size_tto NanNew<Integer>. If fixed this casting all size_t passed to NanNew<Integer> to uint32_t.

TooTallNate commented 9 years ago

I think #45 superceded this.