Skip to content

Commit

Permalink
Cbindgen: update to last version -> linting change
Browse files Browse the repository at this point in the history
  • Loading branch information
commial committed Jun 25, 2023
1 parent e7ce13f commit 4546de6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
15 changes: 12 additions & 3 deletions bindings/C/mla.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ typedef void *MLAConfigHandle;
* If successful, returns 0 and sets the number of bytes actually written to its last
* parameter. Otherwise, returns an error code on failure.
*/
typedef int32_t (*MLAWriteCallback)(const uint8_t *buffer, uint32_t buffer_len, void *context, uint32_t *bytes_written);
typedef int32_t (*MLAWriteCallback)(const uint8_t *buffer,
uint32_t buffer_len,
void *context,
uint32_t *bytes_written);

/**
* Implemented by the developper. Should ask the underlying medium (file buffering, HTTP
Expand All @@ -65,7 +68,10 @@ typedef void *MLAArchiveFileHandle;
* If successful, returns 0 and sets the number of bytes actually read to its last
* parameter. Otherwise, returns an error code on failure.
*/
typedef int32_t (*MlaReadCallback)(uint8_t *buffer, uint32_t buffer_len, void *context, uint32_t *bytes_read);
typedef int32_t (*MlaReadCallback)(uint8_t *buffer,
uint32_t buffer_len,
void *context,
uint32_t *bytes_read);

/**
* Implemented by the developper. Seek in the source data.
Expand All @@ -85,7 +91,10 @@ typedef struct FileWriter {
* Return the desired output path which is expected to be writable.
* The callback developper is responsible all security checks and parent path creation.
*/
typedef int32_t (*MlaFileCalback)(void *context, const uint8_t *filename, uintptr_t filename_len, struct FileWriter *file_writer);
typedef int32_t (*MlaFileCalback)(void *context,
const uint8_t *filename,
uintptr_t filename_len,
struct FileWriter *file_writer);

/**
* Structure for MLA archive info
Expand Down
15 changes: 12 additions & 3 deletions bindings/C/mla.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ using MLAConfigHandle = void*;
/// file, and does whatever it wants with it (e.g. write it to a file, to a HTTP stream, etc.)
/// If successful, returns 0 and sets the number of bytes actually written to its last
/// parameter. Otherwise, returns an error code on failure.
using MLAWriteCallback = int32_t(*)(const uint8_t *buffer, uint32_t buffer_len, void *context, uint32_t *bytes_written);
using MLAWriteCallback = int32_t(*)(const uint8_t *buffer,
uint32_t buffer_len,
void *context,
uint32_t *bytes_written);

/// Implemented by the developper. Should ask the underlying medium (file buffering, HTTP
/// buffering, etc.) to flush any internal buffer.
Expand All @@ -59,7 +62,10 @@ using MLAArchiveFileHandle = void*;
/// Implemented by the developper. Read between 0 and buffer_len into buffer.
/// If successful, returns 0 and sets the number of bytes actually read to its last
/// parameter. Otherwise, returns an error code on failure.
using MlaReadCallback = int32_t(*)(uint8_t *buffer, uint32_t buffer_len, void *context, uint32_t *bytes_read);
using MlaReadCallback = int32_t(*)(uint8_t *buffer,
uint32_t buffer_len,
void *context,
uint32_t *bytes_read);

/// Implemented by the developper. Seek in the source data.
/// If successful, returns 0 and sets the new position to its last
Expand All @@ -75,7 +81,10 @@ struct FileWriter {
/// Implemented by the developper
/// Return the desired output path which is expected to be writable.
/// The callback developper is responsible all security checks and parent path creation.
using MlaFileCalback = int32_t(*)(void *context, const uint8_t *filename, uintptr_t filename_len, FileWriter *file_writer);
using MlaFileCalback = int32_t(*)(void *context,
const uint8_t *filename,
uintptr_t filename_len,
FileWriter *file_writer);

/// Structure for MLA archive info
struct ArchiveInfo {
Expand Down

0 comments on commit 4546de6

Please sign in to comment.