Skip to content

Commit

Permalink
Implement JSON parse and stringify
Browse files Browse the repository at this point in the history
A couple of yaks on my way:

  - Add bazel `BUILD` file to frozen
  - Rename some internal mjs functions because they conflicted with
    frozen

PUBLISHED_FROM=fa403fb456b32a9e61af529030c09a12167b8200
  • Loading branch information
dimonomid authored and cesantabot committed Jan 13, 2017
1 parent 69d64af commit ea88e40
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- mode: gn -*-
package(default_visibility = ["//visibility:public"])

cc_library(
name = "frozen",
srcs = [
"frozen.c",
],
hdrs = [
"frozen.h",
],
)
4 changes: 4 additions & 0 deletions frozen.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,22 @@ typedef unsigned _int64 uint64_t;
#endif
#define PRId64 "I64d"
#define PRIu64 "I64u"
#if !defined(SIZE_T_FMT)
#if _MSC_VER >= 1310
#define SIZE_T_FMT "Iu"
#else
#define SIZE_T_FMT "u"
#endif
#endif
#else /* _WIN32 */
/* <inttypes.h> wants this for C++ */
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h>
#if !defined(SIZE_T_FMT)
#define SIZE_T_FMT "zu"
#endif
#endif /* _WIN32 */

#define INT64_FMT PRId64
Expand Down

0 comments on commit ea88e40

Please sign in to comment.