Skip to content

Commit

Permalink
Code cleanup, remove useless comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Antares0982 committed Dec 18, 2024
1 parent 00ad93e commit fa52f4a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
8 changes: 0 additions & 8 deletions src/decode/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,14 +681,6 @@ force_inline bool read_string(DecodeObjStackInfo *restrict decode_obj_stack_info
// this is a fast path for ascii strings. directly copy the buffer to pyobject
*ptr = src + 1;
return pyyjson_decode_string(decode_obj_stack_info, src_start, src - src_start, PYYJSON_STRING_TYPE_ASCII, is_key);
// pyyjson_string_op* string_op =(pyyjson_string_op*) *op;
// PYYJSON_WRITE_OP(string_op, PYYJSON_OP_STRING | PYYJSON_STRING_FLAG_ASCII);
// string_op->data = (char *)src_start;
// string_op->len = src - src_start;
// *op = (pyyjson_op*)(string_op + 1);
// // buffer unchanged
// return true;

} else if(src != src_start){
memcpy(temp_string_buf, src_start, src - src_start);
len_ucs1 = src - src_start;
Expand Down
5 changes: 1 addition & 4 deletions src/decode/decode_float.inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1186,10 +1186,7 @@ force_inline bool read_number(DecodeObjStackInfo *decode_obj_stack_info, u8 **pt
if (unlikely(f >= HUGE_VAL || f <= -HUGE_VAL)) {
return_inf();
}

// PYYJSON_WRITE_OP(op_float_final, PYYJSON_OP_NUMBER | PYYJSON_NUM_FLAG_FLOAT);
// *op = (pyyjson_op*)(op_float_final + 1);
// val->tag = YYJSON_TYPE_NUM | YYJSON_SUBTYPE_REAL;

*end = cur;
return pyyjson_decode_double(decode_obj_stack_info, f);
return true;
Expand Down

0 comments on commit fa52f4a

Please sign in to comment.