Skip to content

Commit

Permalink
PHPC-951: CursorId is a signed 64-bit integer
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Apr 14, 2017
1 parent a2da17f commit 63f509a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion php_phongo_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ typedef struct {

typedef struct {
PHONGO_ZEND_OBJECT_PRE
uint64_t id;
int64_t id;
PHONGO_ZEND_OBJECT_POST
} php_phongo_cursorid_t;

Expand Down
4 changes: 2 additions & 2 deletions src/MongoDB/CursorId.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static PHP_METHOD(CursorId, __toString)
return;
}

tmp_len = spprintf(&tmp, 0, "%" PRIu64, intern->id);
tmp_len = spprintf(&tmp, 0, "%" PRId64, intern->id);
PHONGO_RETVAL_STRINGL(tmp, tmp_len);
efree(tmp);
} /* }}} */
Expand Down Expand Up @@ -116,7 +116,7 @@ static HashTable *php_phongo_cursorid_get_debug_info(zval *object, int *is_temp
char tmp[24];
int tmp_len;

tmp_len = snprintf(tmp, sizeof(tmp), "%" PRIu64, intern->id);
tmp_len = snprintf(tmp, sizeof(tmp), "%" PRId64, intern->id);
ADD_ASSOC_STRINGL(&retval, "id", tmp, tmp_len);
}
#else
Expand Down

0 comments on commit 63f509a

Please sign in to comment.