]> granicus.if.org Git - jq/commit
Make jq.h usable from C++ 841/head
authorDavid Tolnay <dtolnay@gmail.com>
Sat, 4 Jul 2015 21:56:07 +0000 (14:56 -0700)
committerDavid Tolnay <dtolnay@gmail.com>
Sat, 4 Jul 2015 22:08:01 +0000 (15:08 -0700)
commit1e5e0c9fe2bed8d55cc6d113410c0fdea07f5373
tree45e722809dfc2088ddf632f4ad32a3c09b17fa8b
parent05899f8b3ee7a78e5f9d8380a9cae81c72cf6456
Make jq.h usable from C++

Previously, with clang++:
jq.h:46:37: error: typedef redefinition with different
      types ('struct jq_util_input_state *' vs 'jq_util_input_state')

With g++:
jq.h:46:37: error: conflicting declaration
      ‘typedef struct jq_util_input_state* jq_util_input_state’

This typedef was added to libjq by commit 0d41447 which was
after the 1.4 release, so although it is a public API, this
is not a backcompat break because it has never been in a
release.

Specifying the "*" at all uses of jq_util_input_state is
slightly tedious, but jq_state already works that way, so at
least it will be consistent.
jq.h
main.c
util.c