Commit 9bf6b1ac authored by Dmitri Shubin's avatar Dmitri Shubin

fix output of Int8 values for Solaris

parent 4216cbed
...@@ -241,7 +241,7 @@ private: ...@@ -241,7 +241,7 @@ private:
switch (value.which()) { switch (value.which()) {
case schema::Value::VOID: return kj::strTree(" ::capnp::VOID"); case schema::Value::VOID: return kj::strTree(" ::capnp::VOID");
case schema::Value::BOOL: return kj::strTree(value.getBool() ? "true" : "false"); case schema::Value::BOOL: return kj::strTree(value.getBool() ? "true" : "false");
case schema::Value::INT8: return kj::strTree(value.getInt8()); case schema::Value::INT8: return kj::strTree(int(value.getInt8()));
case schema::Value::INT16: return kj::strTree(value.getInt16()); case schema::Value::INT16: return kj::strTree(value.getInt16());
case schema::Value::INT32: return kj::strTree(value.getInt32()); case schema::Value::INT32: return kj::strTree(value.getInt32());
case schema::Value::INT64: return kj::strTree(value.getInt64(), "ll"); case schema::Value::INT64: return kj::strTree(value.getInt64(), "ll");
...@@ -652,6 +652,13 @@ private: ...@@ -652,6 +652,13 @@ private:
setterDefault = " = ::capnp::VOID"; setterDefault = " = ::capnp::VOID";
break; break;
case schema::Type::INT8:
kind = FieldKind::PRIMITIVE;
if (defaultBody.getInt8() != 0) {
defaultMask = kj::str(int(defaultBody.getInt8()), "");
}
break;
#define HANDLE_PRIMITIVE(discrim, typeName, defaultName, suffix) \ #define HANDLE_PRIMITIVE(discrim, typeName, defaultName, suffix) \
case schema::Type::discrim: \ case schema::Type::discrim: \
kind = FieldKind::PRIMITIVE; \ kind = FieldKind::PRIMITIVE; \
...@@ -661,7 +668,7 @@ private: ...@@ -661,7 +668,7 @@ private:
break; break;
HANDLE_PRIMITIVE(BOOL, bool, Bool, ); HANDLE_PRIMITIVE(BOOL, bool, Bool, );
HANDLE_PRIMITIVE(INT8 , ::int8_t , Int8 , ); //HANDLE_PRIMITIVE(INT8 , ::int8_t , Int8 , );
HANDLE_PRIMITIVE(INT16, ::int16_t, Int16, ); HANDLE_PRIMITIVE(INT16, ::int16_t, Int16, );
HANDLE_PRIMITIVE(INT32, ::int32_t, Int32, ); HANDLE_PRIMITIVE(INT32, ::int32_t, Int32, );
HANDLE_PRIMITIVE(INT64, ::int64_t, Int64, ll); HANDLE_PRIMITIVE(INT64, ::int64_t, Int64, ll);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment