Skip to content
Permalink
Browse files

Routing, bugfix: compile error on windows.

  • Loading branch information...
xicilion committed Aug 29, 2019
1 parent a0b4af9 commit 1829d2471e995b1f34acb77a4df236af792e8924
@@ -49,8 +49,8 @@ class Routing : public Routing_base {
virtual result_t append(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal);
virtual result_t append(exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal);
virtual result_t append(exlib::string method, exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal);
virtual result_t host(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal);
virtual result_t host(exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal);
virtual result_t _host(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal);
virtual result_t _host(exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal);
virtual result_t all(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal);
virtual result_t all(exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal);
virtual result_t get(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal);
@@ -45,8 +45,8 @@ class Url : public UrlObject_base {
virtual result_t set_username(exlib::string newVal);
virtual result_t get_password(exlib::string& retVal);
virtual result_t set_password(exlib::string newVal);
virtual result_t get_host(exlib::string& retVal);
virtual result_t set_host(exlib::string newVal);
virtual result_t get__host(exlib::string& retVal);
virtual result_t set__host(exlib::string newVal);
virtual result_t get_hostname(exlib::string& retVal);
virtual result_t set_hostname(exlib::string newVal);
virtual result_t get_port(exlib::string& retVal);
@@ -56,9 +56,9 @@ class Int64_base : public object_base {
static void s_compare(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_shiftLeft(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_shiftRight(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_and(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_or(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_xor(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s__and(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s__or(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s__xor(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_add(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_sub(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_multi(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -76,9 +76,9 @@ inline ClassInfo& Int64_base::class_info()
{ "compare", s_compare, false },
{ "shiftLeft", s_shiftLeft, false },
{ "shiftRight", s_shiftRight, false },
{ "and", s_and, false },
{ "or", s_or, false },
{ "xor", s_xor, false },
{ "and", s__and, false },
{ "or", s__or, false },
{ "xor", s__xor, false },
{ "add", s_add, false },
{ "sub", s_sub, false },
{ "multi", s_multi, false },
@@ -247,7 +247,7 @@ inline void Int64_base::s_shiftRight(const v8::FunctionCallbackInfo<v8::Value>&
METHOD_RETURN();
}

inline void Int64_base::s_and(const v8::FunctionCallbackInfo<v8::Value>& args)
inline void Int64_base::s__and(const v8::FunctionCallbackInfo<v8::Value>& args)
{
obj_ptr<Int64_base> vr;

@@ -264,7 +264,7 @@ inline void Int64_base::s_and(const v8::FunctionCallbackInfo<v8::Value>& args)
METHOD_RETURN();
}

inline void Int64_base::s_or(const v8::FunctionCallbackInfo<v8::Value>& args)
inline void Int64_base::s__or(const v8::FunctionCallbackInfo<v8::Value>& args)
{
obj_ptr<Int64_base> vr;

@@ -281,7 +281,7 @@ inline void Int64_base::s_or(const v8::FunctionCallbackInfo<v8::Value>& args)
METHOD_RETURN();
}

inline void Int64_base::s_xor(const v8::FunctionCallbackInfo<v8::Value>& args)
inline void Int64_base::s__xor(const v8::FunctionCallbackInfo<v8::Value>& args)
{
obj_ptr<Int64_base> vr;

@@ -30,8 +30,8 @@ class Routing_base : public Handler_base {
virtual result_t append(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal) = 0;
virtual result_t append(exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal) = 0;
virtual result_t append(exlib::string method, exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal) = 0;
virtual result_t host(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal) = 0;
virtual result_t host(exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal) = 0;
virtual result_t _host(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal) = 0;
virtual result_t _host(exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal) = 0;
virtual result_t all(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal) = 0;
virtual result_t all(exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal) = 0;
virtual result_t get(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal) = 0;
@@ -54,7 +54,7 @@ class Routing_base : public Handler_base {
public:
static void s__new(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_append(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_host(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s__host(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_all(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_get(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_post(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -70,7 +70,7 @@ inline ClassInfo& Routing_base::class_info()
{
static ClassData::ClassMethod s_method[] = {
{ "append", s_append, false },
{ "host", s_host, false },
{ "host", s__host, false },
{ "all", s_all, false },
{ "get", s_get, false },
{ "post", s_post, false },
@@ -158,7 +158,7 @@ inline void Routing_base::s_append(const v8::FunctionCallbackInfo<v8::Value>& ar
METHOD_RETURN();
}

inline void Routing_base::s_host(const v8::FunctionCallbackInfo<v8::Value>& args)
inline void Routing_base::s__host(const v8::FunctionCallbackInfo<v8::Value>& args)
{
obj_ptr<Routing_base> vr;

@@ -170,14 +170,14 @@ inline void Routing_base::s_host(const v8::FunctionCallbackInfo<v8::Value>& args

ARG(v8::Local<v8::Object>, 0);

hr = pInst->host(v0, vr);
hr = pInst->_host(v0, vr);

METHOD_OVER(2, 2);

ARG(exlib::string, 0);
ARG(obj_ptr<Handler_base>, 1);

hr = pInst->host(v0, v1, vr);
hr = pInst->_host(v0, v1, vr);

METHOD_RETURN();
}
@@ -39,8 +39,8 @@ class UrlObject_base : public object_base {
virtual result_t set_username(exlib::string newVal) = 0;
virtual result_t get_password(exlib::string& retVal) = 0;
virtual result_t set_password(exlib::string newVal) = 0;
virtual result_t get_host(exlib::string& retVal) = 0;
virtual result_t set_host(exlib::string newVal) = 0;
virtual result_t get__host(exlib::string& retVal) = 0;
virtual result_t set__host(exlib::string newVal) = 0;
virtual result_t get_hostname(exlib::string& retVal) = 0;
virtual result_t set_hostname(exlib::string newVal) = 0;
virtual result_t get_port(exlib::string& retVal) = 0;
@@ -78,8 +78,8 @@ class UrlObject_base : public object_base {
static void s_set_username(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& args);
static void s_get_password(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& args);
static void s_set_password(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& args);
static void s_get_host(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& args);
static void s_set_host(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& args);
static void s_get__host(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& args);
static void s_set__host(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& args);
static void s_get_hostname(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& args);
static void s_set_hostname(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& args);
static void s_get_port(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& args);
@@ -114,7 +114,7 @@ inline ClassInfo& UrlObject_base::class_info()
{ "auth", s_get_auth, s_set_auth, false },
{ "username", s_get_username, s_set_username, false },
{ "password", s_get_password, s_set_password, false },
{ "host", s_get_host, s_set_host, false },
{ "host", s_get__host, s_set__host, false },
{ "hostname", s_get_hostname, s_set_hostname, false },
{ "port", s_get_port, s_set_port, false },
{ "path", s_get_path, s_set_path, false },
@@ -377,27 +377,27 @@ inline void UrlObject_base::s_set_password(v8::Local<v8::Name> property, v8::Loc
PROPERTY_SET_LEAVE();
}

inline void UrlObject_base::s_get_host(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& args)
inline void UrlObject_base::s_get__host(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& args)
{
exlib::string vr;

METHOD_NAME("UrlObject.host");
METHOD_INSTANCE(UrlObject_base);
PROPERTY_ENTER();

hr = pInst->get_host(vr);
hr = pInst->get__host(vr);

METHOD_RETURN();
}

inline void UrlObject_base::s_set_host(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& args)
inline void UrlObject_base::s_set__host(v8::Local<v8::Name> property, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& args)
{
METHOD_NAME("UrlObject.host");
METHOD_INSTANCE(UrlObject_base);
PROPERTY_ENTER();
PROPERTY_VAL(exlib::string);

hr = pInst->set_host(v0);
hr = pInst->set__host(v0);

PROPERTY_SET_LEAVE();
}
@@ -116,7 +116,7 @@ class console_base : public object_base {
static void s_timeElapse(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_timeEnd(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_trace(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_assert(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s__assert(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_print(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_moveTo(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_hideCursor(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -158,7 +158,7 @@ inline ClassInfo& console_base::class_info()
{ "timeElapse", s_timeElapse, true },
{ "timeEnd", s_timeEnd, true },
{ "trace", s_trace, true },
{ "assert", s_assert, true },
{ "assert", s__assert, true },
{ "print", s_print, true },
{ "moveTo", s_moveTo, true },
{ "hideCursor", s_hideCursor, true },
@@ -530,7 +530,7 @@ inline void console_base::s_trace(const v8::FunctionCallbackInfo<v8::Value>& arg
METHOD_VOID();
}

inline void console_base::s_assert(const v8::FunctionCallbackInfo<v8::Value>& args)
inline void console_base::s__assert(const v8::FunctionCallbackInfo<v8::Value>& args)
{
METHOD_NAME("console.assert");
METHOD_ENTER();
@@ -134,7 +134,7 @@ class util_base : public object_base {
static void s_first(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_last(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_unique(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_union(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s__union(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_intersection(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_flatten(const v8::FunctionCallbackInfo<v8::Value>& args);
static void s_without(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -197,7 +197,7 @@ inline ClassInfo& util_base::class_info()
{ "first", s_first, true },
{ "last", s_last, true },
{ "unique", s_unique, true },
{ "union", s_union, true },
{ "union", s__union, true },
{ "intersection", s_intersection, true },
{ "flatten", s_flatten, true },
{ "without", s_without, true },
@@ -906,7 +906,7 @@ inline void util_base::s_unique(const v8::FunctionCallbackInfo<v8::Value>& args)
METHOD_RETURN();
}

inline void util_base::s_union(const v8::FunctionCallbackInfo<v8::Value>& args)
inline void util_base::s__union(const v8::FunctionCallbackInfo<v8::Value>& args)
{
v8::Local<v8::Array> vr;

@@ -269,7 +269,7 @@ exlib::string host2RegExp(exlib::string pattern)
exlib::string res;
exlib::string str;
exlib::string re, re1;
char ch, last_ch;
char ch;

while (!p.end()) {
ch = p.getChar();
@@ -372,12 +372,12 @@ result_t Routing::append(exlib::string pattern, Handler_base* hdlr,
return append("*", pattern, hdlr, retVal);
}

result_t Routing::host(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal)
result_t Routing::_host(v8::Local<v8::Object> map, obj_ptr<Routing_base>& retVal)
{
return _append("HOST", map, retVal);
}

result_t Routing::host(exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal)
result_t Routing::_host(exlib::string pattern, Handler_base* hdlr, obj_ptr<Routing_base>& retVal)
{
return append("HOST", pattern, hdlr, retVal);
}
@@ -451,7 +451,7 @@ result_t Url::format(v8::Local<v8::Object> args)
set_password(str);

if (getString(isolate, args, "host", str))
set_host(str);
set__host(str);
if (getString(isolate, args, "port", str))
set_port(str);

@@ -617,7 +617,7 @@ result_t Url::get_href(exlib::string& retVal)
retVal.append(1, '@');
}

get_host(str);
get__host(str);
retVal.append(str);

get_path(str);
@@ -724,13 +724,13 @@ result_t Url::set_password(exlib::string newVal)
return 0;
}

result_t Url::get_host(exlib::string& retVal)
result_t Url::get__host(exlib::string& retVal)
{
retVal = m_host;
return 0;
}

result_t Url::set_host(exlib::string newVal)
result_t Url::set__host(exlib::string newVal)
{
m_host = newVal;
return 0;
File renamed without changes.
File renamed without changes.

0 comments on commit 1829d24

Please sign in to comment.
You can’t perform that action at this time.