Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed buf2val_ll to return int64_t. #262

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Vector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ unsigned int Vector::val2buf(void *val, bool reuse) {
return ret_value;
}

uint64_t Vector::val2buf_ll(void *val, bool reuse) {
int64_t Vector::val2buf_ll(void *val, bool reuse) {
// Jose Garcia

// Added for zero-length arrays - support in the handlers. jhrg 1/29/16
Expand Down Expand Up @@ -1378,7 +1378,7 @@ uint64_t Vector::val2buf_ll(void *val, bool reuse) {
throw InternalErr(__FILE__, __LINE__, "Vector::val2buf: bad type");
}

return (unsigned int)width_ll(true);
return width_ll(true);
}

/**
Expand Down Expand Up @@ -1476,7 +1476,7 @@ unsigned int Vector::buf2val(void **val) {
}
}

uint64_t Vector::buf2val_ll(void **val) {
int64_t Vector::buf2val_ll(void **val) {
// Jose Garcia
// The same comment in Vector::val2buf applies here!
if (!val)
Expand Down Expand Up @@ -1511,8 +1511,8 @@ uint64_t Vector::buf2val_ll(void **val) {
if (!*val)
*val = new char[wid];

memcpy(*val, d_buf, (uint64_t)wid);
return (uint64_t)wid;
memcpy(*val, d_buf, wid);
return wid;

case dods_str_c:
case dods_url_c: {
Expand All @@ -1525,7 +1525,7 @@ uint64_t Vector::buf2val_ll(void **val) {
for (int64_t i = 0; i < d_length_ll; ++i)
*(static_cast<string *>(*val) + i) = d_str[i];

return (uint64_t)width_ll();
return width_ll();
}

default:
Expand Down
4 changes: 2 additions & 2 deletions Vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ class Vector : public BaseType {
unsigned int val2buf(void *val, bool reuse = false) override;
unsigned int buf2val(void **val) override;

uint64_t val2buf_ll(void *val, bool reuse = false);
uint64_t buf2val_ll(void **val);
int64_t val2buf_ll(void *val, bool reuse = false);
int64_t buf2val_ll(void **val);

void set_vec(unsigned int i, BaseType *val);
void set_vec_nocopy(unsigned int i, BaseType *val);
Expand Down
4 changes: 0 additions & 4 deletions unit-tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ check-local:
endif

# If cppunit exists and big array test option are chosen, turn on BigArrayTest.
if CPPUNIT
if USE_BA
UNIT_TESTS +=BigArrayTest
endif
endif

# making these link statically makes them easier to debug and to use
# with OSX's leaks tool. It also seems to force the linker to use the
Expand Down
Loading