Jef Roosens Chewing_Bever
Loading Heatmap…

Jef Roosens commented on pull request vieter-v/libvieter#6

Refactor package module into C

I don't personally use this style of free function right now, but it might be interesting to migrate all free functions to this style indeed. I'm assuming the pointer-to-pointer is so you can set the variable containing the pointer to NULL as well?

2023-01-29 13:42:07 +01:00

Jef Roosens commented on pull request vieter-v/libvieter#6

Refactor package module into C

As mentioned on matrix, this function should become a streaming one.

2023-01-29 13:42:07 +01:00

Jef Roosens commented on pull request vieter-v/libvieter#6

Refactor package module into C

This check is not safe, the dynarray code doesn't make any guarantees about empty fields being NULL, they're simply malloc'ed and not initialised.

2023-01-29 13:42:07 +01:00

Jef Roosens commented on pull request vieter-v/libvieter#6

Refactor package module into C

Oh smart, no array indexing required, didn't even think of that ;p

2023-01-29 13:42:07 +01:00

Jef Roosens commented on pull request vieter-v/libvieter#6

Refactor package module into C

I'm not quite sure yet where I'd like to place third-party code (in case we start adding more stuff like this), but considering this is the only place this is used, just leaving it here for now is fine.

2023-01-29 13:42:07 +01:00

Jef Roosens commented on pull request vieter-v/libvieter#6

Refactor package module into C

This should also use `SMALL_BUFF_SIZE` I think, just for consistency.

2023-01-29 13:42:07 +01:00

Jef Roosens commented on pull request vieter-v/libvieter#6

Refactor package module into C

Shouldn't this be `sizeof(a package)`?

2023-01-29 13:42:07 +01:00

Jef Roosens commented on pull request vieter-v/libvieter#6

Refactor package module into C

Returning `NULL` when a function fails doesn't say anything about why the function failed. A better API imo (which I also use in the heap module) is for the function to return an enum value intead, indicating the success of the function. The output is written to a pointer-to-pointer that is passed as the first argument of the function.

2023-01-29 13:42:07 +01:00

Jef Roosens suggested changes for vieter-v/libvieter#6

Refactor package module into C

In general, the code isn't formatted at all, but that can be fixed by a simple `make fmt`.

2023-01-29 13:42:07 +01:00

Jef Roosens commented on pull request vieter-v/libvieter#6

Refactor package module into C

Vieter doesn't only supports zstd-compressed archives. Currently it also accepts xz- or gzip-compressed archives, so this should be accounted for.

2023-01-29 13:42:07 +01:00

Jef Roosens commented on pull request vieter-v/libvieter#6

Refactor package module into C

General note for `snprintf` usage: what happens if the value is larger than the buffer? Is it simply cut off? Cuz if so, we shouldn't be making assumptions about the length of the input.

2023-01-29 13:42:07 +01:00

Jef Roosens pushed to red-black-tree at Chewing_Bever/libvieter

  • 3fb027715c test(tree): validation function to use in testing

2023-01-28 19:28:48 +01:00

Jef Roosens pushed to dev at Chewing_Bever/vieter

2023-01-28 17:35:47 +01:00

Jef Roosens pushed to dev at vieter-v/vieter

2023-01-28 17:35:19 +01:00

Jef Roosens pushed to main at vieter-v/metrics

2023-01-28 17:33:55 +01:00

Jef Roosens pushed to main at vieter-v/metrics

  • ae2eeeb974 fix: add buckets_set function to interface

2023-01-28 17:33:16 +01:00

Jef Roosens pushed to main at vieter-v/metrics

2023-01-28 17:29:31 +01:00

Jef Roosens pushed to mem-usage at vieter-v/metrics

2023-01-28 17:23:00 +01:00

Jef Roosens created branch mem-usage in vieter-v/metrics

2023-01-28 17:23:00 +01:00

Jef Roosens pushed to dev at Chewing_Bever/vieter

2023-01-28 16:00:42 +01:00