/* {{{ proto string CursorId::__toString() Returns the string representation of the CursorId */ PHP_METHOD(CursorId, __toString) { php_phongo_cursorid_t *intern; SUPPRESS_UNUSED_WARNING(return_value_ptr) SUPPRESS_UNUSED_WARNING(return_value_used) intern = Z_CURSORID_OBJ_P(getThis()); if (zend_parse_parameters_none() == FAILURE) { return; } RETVAL_LONG(intern->id); convert_to_string(return_value); }
/* {{{ proto string CursorId::__toString() Returns the string representation of the CursorId */ PHP_METHOD(CursorId, __toString) { php_phongo_cursorid_t *intern; char *tmp; int tmp_len; SUPPRESS_UNUSED_WARNING(return_value_ptr) SUPPRESS_UNUSED_WARNING(return_value_used) intern = Z_CURSORID_OBJ_P(getThis()); if (zend_parse_parameters_none() == FAILURE) { return; } tmp_len = spprintf(&tmp, 0, "%" PRIu64, intern->id); PHONGO_RETVAL_STRINGL(tmp, tmp_len); efree(tmp); }