Hackfut Security File Manager
Current Path:
/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/oj-3.7.12/ext/oj
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.4.0
/
gems
/
oj-3.7.12
/
ext
/
oj
/
📁
..
📄
.sitearchdir.-.oj.time
(0 B)
📄
Makefile
(9.43 KB)
📄
buf.h
(3.07 KB)
📄
cache8.c
(2.11 KB)
📄
cache8.h
(1.93 KB)
📄
circarray.c
(1.25 KB)
📄
circarray.h
(579 B)
📄
code.c
(5.2 KB)
📄
code.h
(974 B)
📄
compat.c
(8.35 KB)
📄
custom.c
(31.7 KB)
📄
dump.c
(29.51 KB)
📄
dump.h
(2.8 KB)
📄
dump_compat.c
(26.02 KB)
📄
dump_leaf.c
(5.47 KB)
📄
dump_object.c
(20.4 KB)
📄
dump_strict.c
(11.08 KB)
📄
encode.h
(1.78 KB)
📄
err.c
(1.24 KB)
📄
err.h
(2.53 KB)
📄
extconf.rb
(1.19 KB)
📄
fast.c
(42.43 KB)
📄
hash.c
(4.11 KB)
📄
hash.h
(1.9 KB)
📄
hash_test.c
(16.02 KB)
📄
mimic_json.c
(25.65 KB)
📄
object.c
(19.56 KB)
📄
odd.c
(5.37 KB)
📄
odd.h
(1.08 KB)
📄
oj.c
(69.29 KB)
📄
oj.h
(9.93 KB)
📄
oj.so
(1.08 MB)
📄
parse.c
(27.28 KB)
📄
parse.h
(3 KB)
📄
rails.c
(38.54 KB)
📄
rails.h
(392 B)
📄
reader.c
(6.06 KB)
📄
reader.h
(2.84 KB)
📄
resolve.c
(2.35 KB)
📄
resolve.h
(351 B)
📄
rxclass.c
(2.96 KB)
📄
rxclass.h
(653 B)
📄
saj.c
(17.11 KB)
📄
scp.c
(5.54 KB)
📄
sparse.c
(22.78 KB)
📄
stream_writer.c
(10.16 KB)
📄
strict.c
(5.4 KB)
📄
string_writer.c
(13.4 KB)
📄
trace.c
(2.08 KB)
📄
trace.h
(838 B)
📄
util.c
(3.37 KB)
📄
util.h
(313 B)
📄
val_stack.c
(3.63 KB)
📄
val_stack.h
(4.79 KB)
📄
wab.c
(15.25 KB)
Editing: parse.h
/* parse.h * Copyright (c) 2011, Peter Ohler * All rights reserved. */ #ifndef OJ_PARSE_H #define OJ_PARSE_H #include <stdarg.h> #include <stdio.h> #include <string.h> #include "ruby.h" #include "oj.h" #include "val_stack.h" #include "circarray.h" #include "reader.h" #include "rxclass.h" struct _rxClass; typedef struct _numInfo { int64_t i; int64_t num; int64_t div; int64_t di; const char *str; size_t len; long exp; int big; int infinity; int nan; int neg; int hasExp; int no_big; } *NumInfo; typedef struct _parseInfo { // used for the string parser const char *json; const char *cur; const char *end; // used for the stream parser struct _reader rd; struct _err err; struct _options options; VALUE handler; struct _valStack stack; CircArray circ_array; struct _rxClass str_rx; int expect_value; int max_depth; // just for the json gem VALUE proc; VALUE (*start_hash)(struct _parseInfo *pi); void (*end_hash)(struct _parseInfo *pi); VALUE (*hash_key)(struct _parseInfo *pi, const char *key, size_t klen); void (*hash_set_cstr)(struct _parseInfo *pi, Val kval, const char *str, size_t len, const char *orig); void (*hash_set_num)(struct _parseInfo *pi, Val kval, NumInfo ni); void (*hash_set_value)(struct _parseInfo *pi, Val kval, VALUE value); VALUE (*start_array)(struct _parseInfo *pi); void (*end_array)(struct _parseInfo *pi); void (*array_append_cstr)(struct _parseInfo *pi, const char *str, size_t len, const char *orig); void (*array_append_num)(struct _parseInfo *pi, NumInfo ni); void (*array_append_value)(struct _parseInfo *pi, VALUE value); void (*add_cstr)(struct _parseInfo *pi, const char *str, size_t len, const char *orig); void (*add_num)(struct _parseInfo *pi, NumInfo ni); void (*add_value)(struct _parseInfo *pi, VALUE val); VALUE err_class; bool has_callbacks; } *ParseInfo; extern void oj_parse2(ParseInfo pi); extern void oj_set_error_at(ParseInfo pi, VALUE err_clas, const char* file, int line, const char *format, ...); extern VALUE oj_pi_parse(int argc, VALUE *argv, ParseInfo pi, char *json, size_t len, int yieldOk); extern VALUE oj_num_as_value(NumInfo ni); extern void oj_set_strict_callbacks(ParseInfo pi); extern void oj_set_object_callbacks(ParseInfo pi); extern void oj_set_compat_callbacks(ParseInfo pi); extern void oj_set_wab_callbacks(ParseInfo pi); extern void oj_sparse2(ParseInfo pi); extern VALUE oj_pi_sparse(int argc, VALUE *argv, ParseInfo pi, int fd); static inline void parse_info_init(ParseInfo pi) { memset(pi, 0, sizeof(struct _parseInfo)); } static inline bool empty_ok(Options options) { switch (options->mode) { case ObjectMode: case WabMode: return true; case CompatMode: case RailsMode: return false; case StrictMode: case NullMode: case CustomMode: default: break; } return Yes == options->empty_string; } #endif /* OJ_PARSE_H */
Upload File
Create Folder