[Pkg-javascript-commits] [node-leveldown] 210/492: fix namespaces
Andrew Kelley
andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:14:00 UTC 2014
This is an automated email from the git hooks/post-receive script.
andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.
commit eb4c0417cdac0affb151c0435f7864a47d1cdd1c
Author: Rod Vagg <rod at vagg.org>
Date: Sat Feb 16 11:15:34 2013 +1100
fix namespaces
---
src/async.cc | 4 ++--
src/async.h | 4 ++--
src/batch.cc | 4 ++--
src/batch.h | 4 ++--
src/database.cc | 4 ++--
src/database.h | 4 ++--
src/database_async.cc | 4 ++--
src/database_async.h | 4 ++--
src/leveldown.h | 28 ++++++++++++++--------------
9 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/src/async.cc b/src/async.cc
index 0835e2d..dcd6ca5 100644
--- a/src/async.cc
+++ b/src/async.cc
@@ -10,7 +10,7 @@
#include "async.h"
#include "batch.h"
-namespace levelup {
+namespace leveldown {
/** ASYNC BASE **/
@@ -63,4 +63,4 @@ void AsyncQueueWorker (AsyncWorker* worker) {
);
}
-} // namespace levelup
+} // namespace leveldown
diff --git a/src/async.h b/src/async.h
index 71975ba..1e56e4d 100644
--- a/src/async.h
+++ b/src/async.h
@@ -8,7 +8,7 @@
#include <node.h>
-namespace levelup {
+namespace leveldown {
/* abstract */ class AsyncWorker {
public:
@@ -34,6 +34,6 @@ void AsyncExecute (uv_work_t* req);
void AsyncExecuteComplete (uv_work_t* req);
void AsyncQueueWorker (AsyncWorker* worker);
-} // namespace LevelUP
+} // namespace leveldown
#endif
diff --git a/src/batch.cc b/src/batch.cc
index 4ade9f1..af71621 100644
--- a/src/batch.cc
+++ b/src/batch.cc
@@ -7,7 +7,7 @@
#include "batch.h"
-namespace levelup {
+namespace leveldown {
BatchOp::~BatchOp () {}
@@ -28,4 +28,4 @@ void BatchWrite::Execute (leveldb::WriteBatch* batch) {
batch->Put(key, value);
}
-} // namespace LevelUP
+} // namespace leveldown
diff --git a/src/batch.h b/src/batch.h
index 53cb157..4d90f16 100644
--- a/src/batch.h
+++ b/src/batch.h
@@ -10,7 +10,7 @@
#include "database.h"
-namespace levelup {
+namespace leveldown {
class BatchOp {
public:
@@ -57,6 +57,6 @@ private:
v8::Persistent<v8::Value> valuePtr;
};
-} // namespace levelup
+} // namespace leveldown
#endif
diff --git a/src/database.cc b/src/database.cc
index 45e03ef..b9fd4fb 100644
--- a/src/database.cc
+++ b/src/database.cc
@@ -16,7 +16,7 @@
#include "batch.h"
#include "iterator.h"
-namespace levelup {
+namespace leveldown {
Database::Database (char* location) : location(location) {
db = NULL;
@@ -352,4 +352,4 @@ v8::Handle<v8::Value> Database::ApproximateSize (const v8::Arguments& args) {
return v8::Undefined();
}
-} // namespace LevelUP
+} // namespace leveldown
diff --git a/src/database.h b/src/database.h
index 85c99e3..f2869a4 100644
--- a/src/database.h
+++ b/src/database.h
@@ -12,7 +12,7 @@
#include "leveldown.h"
-namespace levelup {
+namespace leveldown {
LU_OPTION ( createIfMissing ); // for open()
LU_OPTION ( errorIfExists ); // for open()
@@ -81,6 +81,6 @@ private:
LU_V8_METHOD( ApproximateSize)
};
-} // namespace levelup
+} // namespace leveldown
#endif
diff --git a/src/database_async.cc b/src/database_async.cc
index c264063..368e15f 100644
--- a/src/database_async.cc
+++ b/src/database_async.cc
@@ -12,7 +12,7 @@
#include "database_async.h"
#include "batch.h"
-namespace levelup {
+namespace leveldown {
/** OPEN WORKER **/
@@ -235,4 +235,4 @@ void ApproximateSizeWorker::HandleOKCallback () {
RUN_CALLBACK(callback, argv, 2);
}
-} // namespleveldb::ace LevelUP
+} // namespace leveldown
diff --git a/src/database_async.h b/src/database_async.h
index dcb83ba..f9e08a5 100644
--- a/src/database_async.h
+++ b/src/database_async.h
@@ -14,7 +14,7 @@
#include "async.h"
#include "batch.h"
-namespace levelup {
+namespace leveldown {
class OpenWorker : public AsyncWorker {
public:
@@ -162,6 +162,6 @@ public:
uint64_t size;
};
-} // namespace levelup
+} // namespace leveldown
#endif
diff --git a/src/leveldown.h b/src/leveldown.h
index 297cb78..4b0375e 100644
--- a/src/leveldown.h
+++ b/src/leveldown.h
@@ -20,7 +20,7 @@
#define CB_ERR_IF_NULL_OR_UNDEFINED(index, name) \
if (args[index]->IsNull() || args[index]->IsUndefined()) { \
v8::Local<v8::Value> argv[] = { \
- v8::Local<v8::Value>::New(Exception::Error( \
+ v8::Local<v8::Value>::New(v8::Exception::Error( \
v8::String::New("#name cannot be `null` or `undefined`")) \
) \
}; \
@@ -31,7 +31,7 @@
#define FROM_V8_STRING(to, from) \
size_t to ## Sz_; \
char* to; \
- v8::Local<v8::String> to ## Str = from->Tov8::String(); \
+ v8::Local<v8::String> to ## Str = from->ToString(); \
to ## Sz_ = to ## Str->Utf8Length(); \
to = new char[to ## Sz_ + 1]; \
to ## Str->WriteUtf8(to, -1, NULL, v8::String::NO_OPTIONS);
@@ -39,11 +39,11 @@
#define STRING_OR_BUFFER_TO_SLICE(to, from) \
size_t to ## Sz_; \
char* to ## Ch_; \
- if (Buffer::HasInstance(from->ToObject())) { \
- to ## Sz_ = Buffer::Length(from->ToObject()); \
- to ## Ch_ = Buffer::Data(from->ToObject()); \
+ if (node::Buffer::HasInstance(from->ToObject())) { \
+ to ## Sz_ = node::Buffer::Length(from->ToObject()); \
+ to ## Ch_ = node::Buffer::Data(from->ToObject()); \
} else { \
- v8::Local<v8::String> to ## Str = from->Tov8::String(); \
+ v8::Local<v8::String> to ## Str = from->ToString(); \
to ## Sz_ = to ## Str->Utf8Length(); \
to ## Ch_ = new char[to ## Sz_]; \
to ## Str->WriteUtf8(to ## Ch_, -1, NULL, v8::String::NO_NULL_TERMINATION); \
@@ -53,12 +53,12 @@
#define BOOLEAN_OPTION_VALUE(optionsObj, opt) \
bool opt = !optionsObj.IsEmpty() \
&& optionsObj->Has(option_ ## opt) \
- && optionsObj->Get(option_ ## opt)->Booleanv8::Value();
+ && optionsObj->Get(option_ ## opt)->BooleanValue();
#define BOOLEAN_OPTION_VALUE_DEFTRUE(optionsObj, opt) \
bool opt = optionsObj.IsEmpty() \
|| !optionsObj->Has(option_ ## opt) \
- || optionsObj->Get(option_ ## opt)->Booleanv8::Value();
+ || optionsObj->Get(option_ ## opt)->BooleanValue();
#define UINT32_OPTION_VALUE(optionsObj, opt, default) \
uint32_t opt = !optionsObj.IsEmpty() \
@@ -68,14 +68,14 @@
: default;
#define RUN_CALLBACK(callback, argv, length) \
- TryCatch try_catch; \
- callback->Call(Context::GetCurrent()->Global(), length, argv); \
+ v8::TryCatch try_catch; \
+ callback->Call(v8::Context::GetCurrent()->Global(), length, argv); \
if (try_catch.HasCaught()) { \
- FatalException(try_catch); \
+ node::FatalException(try_catch); \
}
#define THROW_RETURN(msg) \
- ThrowException(Exception::Error(v8::String::New(#msg))); \
+ v8::ThrowException(v8::Exception::Error(v8::String::New(#msg))); \
return Undefined();
/* METHOD_SETUP_COMMON setup the following objects:
@@ -95,7 +95,7 @@
callback = v8::Persistent<v8::Function>::New( \
v8::Local<v8::Function>::Cast(args[callbackPos]) \
); \
- } else if (args[callbackPos - 1]->Isv8::Function()) { \
+ } else if (args[callbackPos - 1]->IsFunction()) { \
callback = v8::Persistent<v8::Function>::New( \
v8::Local<v8::Function>::Cast(args[callbackPos - 1]) \
); \
@@ -109,7 +109,7 @@
}
#define METHOD_SETUP_COMMON_ONEARG(name) \
- if (!args[0]->Isv8::Function()) { \
+ if (!args[0]->IsFunction()) { \
THROW_RETURN(name() requires a callback argument 1) \
} \
METHOD_SETUP_COMMON(name, -1, 0)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git
More information about the Pkg-javascript-commits
mailing list