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

Should the write functions use int64_t instead of long for row_count. #282

Open
khc8749 opened this issue Aug 17, 2022 · 1 comment
Open
Labels

Comments

@khc8749
Copy link

khc8749 commented Aug 17, 2022

Is there a good reason not to change these functions from

readstat_error_t readstat_begin_writing_dta(readstat_writer_t *writer, void *user_ctx, long row_count);
readstat_error_t readstat_begin_writing_por(readstat_writer_t *writer, void *user_ctx, long row_count);
readstat_error_t readstat_begin_writing_sas7bcat(readstat_writer_t *writer, void *user_ctx);
readstat_error_t readstat_begin_writing_sas7bdat(readstat_writer_t *writer, void *user_ctx, long row_count);
readstat_error_t readstat_begin_writing_sav(readstat_writer_t *writer, void *user_ctx, long row_count);
readstat_error_t readstat_begin_writing_xport(readstat_writer_t *writer, void *user_ctx, long row_count);

to

readstat_error_t readstat_begin_writing_dta(readstat_writer_t *writer, void *user_ctx, int64_t row_count);
readstat_error_t readstat_begin_writing_por(readstat_writer_t *writer, void *user_ctx, int64_t row_count);
readstat_error_t readstat_begin_writing_sas7bdat(readstat_writer_t *writer, void *user_ctx, int64_t row_count);
readstat_error_t readstat_begin_writing_sav(readstat_writer_t *writer, void *user_ctx, int64_t  row_count);
readstat_error_t readstat_begin_writing_xport(readstat_writer_t *writer, void *user_ctx, int64_t  row_count);

The read functions use int64_t for row_count

@evanmiller
Copy link
Contributor

That would be a better design but would represent an API change as long is 32-bit on Windows.

@evanmiller evanmiller added the API label Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants