We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In #18 and maybe elswhere there's a few patterns that could be abstracted into a few macros, for example
if(obs_indices_resident == NULL) { fprintf(stderr, "Failed to allocate %zd bytes; [%s]:%d\n", sizeof(uint32_t**) * n_obs, __FILE__, __LINE__); exit(EXIT_FAILURE); }
To something like:
#define fail_if_null(mem, size) {\ if (mem == NULL) { \ fprintf(stderr, "Failed to allocate %zd bytes; [%s]:%d\n",\ size, __FILE__, __LINE__);\ exit(EXIT_FAILURE);\ } \ }
So all these lines turn into:
fail_if_null(obs_indices_resident, sizeof(uint32_t**) * n_obs);
disclaimer: my C is a bit rusty and I haven't checked that the code above compiles.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In #18 and maybe elswhere there's a few patterns that could be abstracted into a few macros, for example
To something like:
So all these lines turn into:
disclaimer: my C is a bit rusty and I haven't checked that the code above compiles.
The text was updated successfully, but these errors were encountered: