Browse Source

core: add ROUND_UP() macro

v0.9.1-release
Ben Noordhuis 13 years ago
parent
commit
a58659cd4a
  1. 4
      src/node_internals.h

4
src/node_internals.h

@ -42,6 +42,10 @@ namespace node {
# define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0]))
#endif
#ifndef ROUND_UP
# define ROUND_UP(a, b) ((a) % (b) ? ((a) + (b)) - ((a) % (b)) : (a))
#endif
// this would have been a template function were it not for the fact that g++
// sometimes fails to resolve it...
#define THROW_ERROR(fun) \

Loading…
Cancel
Save