Skip to content

Commit

Permalink
Make the example code more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
abique committed Jan 16, 2024
1 parent 583177d commit 498af28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/clap/plugin-id.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ typedef struct clap_plugin_id {
// eg:
// T binary_id;
// const uint8_t * data = (const uint8_t *)&binary_id;
// char *buffer = malloc(2 * sizeof(binary_id) + 1);
// const size_t buffer_size = 2 * sizeof(binary_id) + 1;
// char *buffer = malloc(buffer_size);
// hex_encode(data, sizeof (binary_id), buffer);
// buffer[buffer_size - 1] = '\0';
//
// Note: if the binary id is sensible to the CPU endianness, the encoded id will be too.
// As a result, the id should be decoded immediately by the consumer.
Expand Down

0 comments on commit 498af28

Please sign in to comment.