Date: Thursday, November 24, 2005 @ 12:18:18
Author: gilles
Path: /cvsroot/carob/carob
Modified: include/Common.hpp (1.10 -> 1.11) src/JavaSocket.cpp (1.12 ->
1.13) src/SQLDataSerialization.cpp (1.6 -> 1.7)
Removed byte typedef that leaded to conflicts with (at least) mySqlLib
Replaced with uint8_t, which is explicit enough
------------------------------+
include/Common.hpp | 3 ++-
src/JavaSocket.cpp | 10 +++++-----
src/SQLDataSerialization.cpp | 2 +-
3 files changed, 8 insertions(+), 7 deletions(-)
Index: carob/include/Common.hpp
diff -u carob/include/Common.hpp:1.10 carob/include/Common.hpp:1.11
--- carob/include/Common.hpp:1.10 Tue Nov 15 18:20:48 2005
+++ carob/include/Common.hpp Thu Nov 24 12:18:18 2005
@@ -35,8 +35,9 @@
#define WARNING_PRE L"WARNING:\t"
#define ERROR_PRE L"ERROR:\t"
-typedef uint8_t byte;
+/** Java byte (signed) */
typedef int8_t java_byte;
+
/**
* Available log levels, sorted by priority (last = higher)
*/
Index: carob/src/JavaSocket.cpp
diff -u carob/src/JavaSocket.cpp:1.12 carob/src/JavaSocket.cpp:1.13
--- carob/src/JavaSocket.cpp:1.12 Tue Nov 15 17:33:24 2005
+++ carob/src/JavaSocket.cpp Thu Nov 24 12:18:18 2005
@@ -182,7 +182,7 @@
// FIXME: we don't support inline zeros. We should get rid of c_str
const wchar_t* oriStr = str.c_str();
- byte* utfStr = new byte[strlenPlusOne];
+ uint8_t* utfStr = new uint8_t[strlenPlusOne];
size_t countConverted;
mbstate_t mbstate;
@@ -235,7 +235,7 @@
mbstate_t mbstate;
memset((void*)&mbstate, 0, sizeof(mbstate));
- byte* utfStr = new byte[lenRec+1];
+ uint8_t* utfStr = new uint8_t[lenRec+1];
memset(utfStr, 0, lenRec+1);
if (receiveFromSocket(fctName, L"UTF string", utfStr, lenRec, 0))
{
@@ -307,7 +307,7 @@
UnexpectedException)
{
wstring fctName(L"JavaSocket::WriteBoolean");
- byte byteToSend = b; // the implicit casts do it right
+ uint8_t byteToSend = b; // the implicit casts do it right
//No byte order problem here: the only value read is '0' for false
//all other values are true
sendToSocket(fctName, L"Boolean", &byteToSend, sizeof(byteToSend),
MSG_NOSIGNAL);
@@ -318,7 +318,7 @@
{
wstring fctName(L"JavaSocket::ReadBoolean");
- byte rec;
+ uint8_t rec;
if (receiveFromSocket(fctName, L"Boolean", &rec, sizeof(rec), 0))
b = rec; // the implicit cast does it right
}
@@ -330,7 +330,7 @@
int readThisTime = 0; //The size read at each receive
while (alreadyRead < len)
{
- readThisTime = recv(socketFd, (byte*)(((byte*)buf)+alreadyRead),
len-alreadyRead, flags);
+ readThisTime = recv(socketFd, (uint8_t*)(((uint8_t*)buf)+alreadyRead),
len-alreadyRead, flags);
if (readThisTime < 0)
{
//this is an error
Index: carob/src/SQLDataSerialization.cpp
diff -u carob/src/SQLDataSerialization.cpp:1.6
carob/src/SQLDataSerialization.cpp:1.7
--- carob/src/SQLDataSerialization.cpp:1.6 Thu Oct 27 11:17:09 2005
+++ carob/src/SQLDataSerialization.cpp Thu Nov 24 12:18:18 2005
@@ -157,7 +157,7 @@
{
int32_t baLength = 0;
input>>baLength;
- byte* byteArrayRead = new byte[baLength];
+ uint8_t* byteArrayRead = new uint8_t[baLength];
int32_t byteRead = 0;
for (int i=0; i<baLength; i++)
{
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits