Skip to content

Commit 86a383d

Browse files
committed
Minor changes
1 parent 07de18d commit 86a383d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cloudsync.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,7 @@ int local_update_move_meta (cloudsync_table_context *table, const char *pk, size
19411941

19421942
// MARK: - Payload Encode / Decode -
19431943

1944-
bool cloudsync_datapayload_check (cloudsync_payload_context *payload, size_t needed) {
1944+
static bool cloudsync_payload_encode_check (cloudsync_payload_context *payload, size_t needed) {
19451945
if (payload->nrows == 0) needed += sizeof(cloudsync_payload_header);
19461946

19471947
// alloc/resize buffer
@@ -1995,7 +1995,7 @@ int cloudsync_payload_encode_step (cloudsync_payload_context *payload, cloudsync
19951995
if (payload->nrows == 0) payload->ncols = (uint16_t)argc;
19961996

19971997
size_t breq = pk_encode_size((dbvalue_t **)argv, argc, 0);
1998-
if (cloudsync_datapayload_check(payload, breq) == false) {
1998+
if (cloudsync_payload_encode_check(payload, breq) == false) {
19991999
return cloudsync_set_error(data, "Not enough memory to resize payload internal buffer", DBRES_NOMEM);
20002000
}
20012001

@@ -2067,7 +2067,7 @@ int cloudsync_payload_encode_final (cloudsync_payload_context *payload, cloudsyn
20672067
return DBRES_OK;
20682068
}
20692069

2070-
int cloudsync_pk_decode_bind_callback (void *xdata, int index, int type, int64_t ival, double dval, char *pval) {
2070+
static int cloudsync_payload_decode_callback (void *xdata, int index, int type, int64_t ival, double dval, char *pval) {
20712071
cloudsync_pk_decode_bind_context *decode_context = (cloudsync_pk_decode_bind_context*)xdata;
20722072
int rc = pk_decode_bind_callback(decode_context->vm, index, type, ival, dval, pval);
20732073

@@ -2183,7 +2183,7 @@ int cloudsync_payload_apply (cloudsync_context *data, const char *payload, int b
21832183

21842184
for (uint32_t i=0; i<nrows; ++i) {
21852185
size_t seek = 0;
2186-
pk_decode((char *)buffer, blen, ncols, &seek, cloudsync_pk_decode_bind_callback, &decoded_context);
2186+
pk_decode((char *)buffer, blen, ncols, &seek, cloudsync_payload_decode_callback, &decoded_context);
21872187
// n is the pk_decode return value, I don't think I should assert here because in any case the next databasevm_step would fail
21882188
// assert(n == ncols);
21892189

0 commit comments

Comments
 (0)