Skip to content

Commit 9d06fd7

Browse files
committed
Update CPJ_ZSTR_ARG
1 parent f4a6415 commit 9d06fd7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

include/cpj.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ extern "C"
3434

3535
typedef char cpj_char_t;
3636
typedef size_t cpj_size_t;
37+
#define CPJ_SIZE_MAX SIZE_MAX
3738

3839
/**
3940
* Description of a JerryScript string for arguments passing
4041
*/
4142
typedef struct
4243
{
43-
const cpj_char_t
44-
*ptr; /**< pointer to the zero-terminated ASCII/UTF-8/CESU-8 string */
44+
/**< pointer to the zero-terminated ASCII/UTF-8/CESU-8 string */
45+
const cpj_char_t *ptr;
4546
cpj_size_t size; /**< size of the string, excluding '\0' terminator */
4647
} cpj_string_t;
4748

@@ -85,7 +86,7 @@ typedef enum
8586
} cpj_path_style_t;
8687

8788
/**
88-
* Helper to to ensure str is a string literal
89+
* Helper to generate a string literal with type const cpj_char_t *
8990
*/
9091
#define CPJ_ZSTR_LITERAL(str) (const cpj_char_t *)(str "")
9192

@@ -94,7 +95,7 @@ typedef enum
9495
* pair.
9596
*/
9697
#define CPJ_ZSTR_ARG(str) \
97-
((CPJ_ZSTR_LITERAL(str))), ((cpj_size_t)(sizeof(str) - 1))
98+
(CPJ_ZSTR_LITERAL(str)), ((cpj_size_t)(sizeof(str) - 1))
9899

99100
/**
100101
* @brief Generates an absolute path based on a base.

0 commit comments

Comments
 (0)