Skip to content

Commit

Permalink
Various docstring fixes
Browse files Browse the repository at this point in the history
Added some missing documentation, replaced deprecated annotations
and other small fixes.
  • Loading branch information
vojtechtrefny committed Mar 1, 2023
1 parent f493957 commit 0a72651
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/bs_size.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ static void mul_64bit (mpz_t rop, const mpz_t op1, uint64_t op2) {
* *************/
/**
* bs_size_free:
* @size: (nullable): %BSSize to free
*
* Clears @size and frees the allocated resources.
*/
Expand All @@ -366,6 +367,7 @@ void bs_size_free (BSSize size) {

/**
* bs_clear_error:
* @error: (nullable): %BSError to clear
*
* Clears @error and frees the allocated resources.
*/
Expand Down Expand Up @@ -583,8 +585,8 @@ BSSize bs_size_new_from_size (const BSSize size) {
*****************/
/**
* bs_size_get_bytes:
* @sgn: (allow-none) (out): sign of the @size - -1, 0 or 1 for negative, zero or positive
* size respectively
* @sgn: (out) (optional): sign of the @size - -1, 0 or 1 for negative, zero or positive
* size respectively
* @error: (out) (optional): place to store error (if any)
*
* Get the number of bytes of the @size.
Expand Down Expand Up @@ -1011,7 +1013,7 @@ BSSize bs_size_grow_mul_float_str (BSSize size, const char *float_str, BSError *

/**
* bs_size_div:
* @sgn: (allow-none) (out): sign of the result
* @sgn: (out) (optional): sign of the result
* @error: (out) (optional): place to store error (if any)
*
* Divide @size1 by @size2. Gives the answer to the question "How many times
Expand Down
4 changes: 2 additions & 2 deletions src/bs_size.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

/**
* BSSize:
*
* An opaque type representing a size in bytes.
*/
typedef struct _BSSize * BSSize;

/**
* BSErrorCode:
*
* @BS_ERROR_INVALID_SPEC: invalid size or unit spec provided
* @BS_ERROR_OVER: a value is over the limits imposed by a type
* @BS_ERROR_ZERO_DIV: an attempt to do division by zero
Expand All @@ -29,9 +29,9 @@ typedef enum {

/**
* BSError:
*
* @code: error code
* @msg: optional error message
*
*/
typedef struct _BSError {
BSErrorCode code;
Expand Down

0 comments on commit 0a72651

Please sign in to comment.