mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
lejp: use explicit signed char return
This commit is contained in:
parent
4afeefbb3c
commit
5a0b5299d2
3 changed files with 10 additions and 10 deletions
|
@ -25,7 +25,7 @@
|
|||
|
||||
void
|
||||
lejp_construct(struct lejp_ctx *ctx,
|
||||
char (*callback)(struct lejp_ctx *ctx, char reason), void *user,
|
||||
signed char (*callback)(struct lejp_ctx *ctx, char reason), void *user,
|
||||
const char * const *paths, unsigned char count_paths)
|
||||
{
|
||||
ctx->st[0].s = 0;
|
||||
|
@ -86,7 +86,7 @@ lejp_destruct(struct lejp_ctx *ctx)
|
|||
|
||||
void
|
||||
lejp_change_callback(struct lejp_ctx *ctx,
|
||||
char (*callback)(struct lejp_ctx *ctx, char reason))
|
||||
signed char (*callback)(struct lejp_ctx *ctx, char reason))
|
||||
{
|
||||
ctx->callback(ctx, LEJPCB_DESTRUCTED);
|
||||
ctx->callback = callback;
|
||||
|
|
|
@ -140,9 +140,9 @@ enum lejp_callbacks {
|
|||
*
|
||||
* LEJPCB_OBJECT_END: An object ended
|
||||
*/
|
||||
LWS_EXTERN char _lejp_callback(struct lejp_ctx *ctx, char reason);
|
||||
LWS_EXTERN signed char _lejp_callback(struct lejp_ctx *ctx, char reason);
|
||||
|
||||
typedef char (*lejp_callback)(struct lejp_ctx *ctx, char reason);
|
||||
typedef signed char (*lejp_callback)(struct lejp_ctx *ctx, char reason);
|
||||
|
||||
#ifndef LEJP_MAX_DEPTH
|
||||
#define LEJP_MAX_DEPTH 12
|
||||
|
@ -179,7 +179,7 @@ struct lejp_ctx {
|
|||
* pointers
|
||||
*/
|
||||
|
||||
char (*callback)(struct lejp_ctx *ctx, char reason);
|
||||
signed char (*callback)(struct lejp_ctx *ctx, char reason);
|
||||
void *user;
|
||||
const char * const *paths;
|
||||
|
||||
|
@ -215,8 +215,8 @@ struct lejp_ctx {
|
|||
|
||||
LWS_VISIBLE LWS_EXTERN void
|
||||
lejp_construct(struct lejp_ctx *ctx,
|
||||
char (*callback)(struct lejp_ctx *ctx, char reason), void *user,
|
||||
const char * const *paths, unsigned char paths_count);
|
||||
signed char (*callback)(struct lejp_ctx *ctx, char reason),
|
||||
void *user, const char * const *paths, unsigned char paths_count);
|
||||
|
||||
LWS_VISIBLE LWS_EXTERN void
|
||||
lejp_destruct(struct lejp_ctx *ctx);
|
||||
|
@ -226,7 +226,7 @@ lejp_parse(struct lejp_ctx *ctx, const unsigned char *json, int len);
|
|||
|
||||
LWS_VISIBLE LWS_EXTERN void
|
||||
lejp_change_callback(struct lejp_ctx *ctx,
|
||||
char (*callback)(struct lejp_ctx *ctx, char reason));
|
||||
signed char (*callback)(struct lejp_ctx *ctx, char reason));
|
||||
|
||||
LWS_VISIBLE LWS_EXTERN int
|
||||
lejp_get_wildcard(struct lejp_ctx *ctx, int wildcard, char *dest, int len);
|
||||
|
|
|
@ -223,7 +223,7 @@ arg_to_bool(const char *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char
|
||||
static signed char
|
||||
lejp_globals_cb(struct lejp_ctx *ctx, char reason)
|
||||
{
|
||||
struct jpargs *a = (struct jpargs *)ctx->user;
|
||||
|
@ -296,7 +296,7 @@ dostring:
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char
|
||||
static signed char
|
||||
lejp_vhosts_cb(struct lejp_ctx *ctx, char reason)
|
||||
{
|
||||
struct jpargs *a = (struct jpargs *)ctx->user;
|
||||
|
|
Loading…
Add table
Reference in a new issue