#define __uv_warn_of(old_, new_) \
do { \
- if (__uv_warn_##old_) break; \
+ if (__uv_warn_##old_ || no_deprecation) break; \
__uv_warn_##old_ = 1; \
fputs("WARNING: " #old_ " is deprecated, use " #new_ "\n", stderr); \
} \
static bool print_eval = false;
static bool force_repl = false;
-static bool no_deprecation = false;
static bool trace_deprecation = false;
static char *eval_string = NULL;
static int option_end_index = 0;
static int debug_port=5858;
static int max_stack_size = 0;
+// used by C++ modules as well
+bool no_deprecation = false;
+
static uv_check_t check_tick_watcher;
static uv_prepare_t prepare_tick_watcher;
static uv_idle_t tick_spinner;
namespace node {
+extern bool no_deprecation;
+
#ifdef _WIN32
// emulate snprintf() on windows, _snprintf() doesn't zero-terminate the buffer
// on overflow...
// io.start();
//
Handle<Value> IOWatcher::New(const Arguments& args) {
- fprintf(stderr, "WARNING: don't use IOWatcher, it'll be removed in v0.9\n");
-
if (!args.IsConstructCall()) {
return FromConstructorTemplate(constructor_template, args);
}
+ if (!no_deprecation) {
+ fprintf(stderr, "WARNING: don't use IOWatcher, it'll be removed in v0.9\n");
+ }
+
HandleScope scope;
IOWatcher *s = new IOWatcher();
s->Wrap(args.This());