Skip to content

Commit

Permalink
use configure VERSION in fjson_version() API
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerhards committed Apr 6, 2016
1 parent e661e87 commit 71c673f
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 37 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
0.99.3 2016-0?-??
- fjson_version now returns configure VERSION
This avoid inconsistency.
- removal of Windows and Android bits
Thanks to Michael Biebl for the patch.
- fixes of the build system
Expand Down
15 changes: 15 additions & 0 deletions DIFFERENCES
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Differences to json-c
---------------------

* hash tables are no longer part of the API; we may use them
internally, but we may also use any other data structure. This
Expand All @@ -17,3 +18,17 @@ Differences to json-c
maintain libfastjson on those platforms, please let us know
and we can work together (a long term commitment) to get this
going again.

* removed API calls:
If you need any of this API calls urgently, please let us know
why you consider it important enough to become re-added;
especially let us know why you think this is important to the
community at large. Thanks.
* [f]json_c_version_num()

* renamed API calls:
* all calls have been added an "f" in the front
json_* --> fjson_*
* the same holds true for preprocessor defines,
JSON_C_* --> FJSON_* (note removal of "_C")
* json_c_version() -> fjson_version()
3 changes: 1 addition & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ libfastjsoninclude_HEADERS = \
debug.h \
json.h \
json_config.h \
json_c_version.h \
json_inttypes.h \
json_object.h \
json_object_iterator.h \
Expand All @@ -38,7 +37,7 @@ libfastjson_la_CPPFLAGS = -Werror
libfastjson_la_SOURCES = \
arraylist.c \
debug.c \
json_c_version.c \
json_version.c \
json_object.c \
json_object_iterator.c \
json_tokener.c \
Expand Down
10 changes: 7 additions & 3 deletions json.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
* Michael Clark <[email protected]>
* Copyright (c) 2009 Hewlett-Packard Development Company, L.P.
* Copyright (c) 2016 Adiscon GmbH
* Rainer Gerhards <[email protected]>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
Expand All @@ -24,7 +26,6 @@ extern "C" {
#include "json_object.h"
#include "json_tokener.h"
#include "json_object_iterator.h"
#include "json_c_version.h"

/**
* Set initial size allocation for memory when creating strings,
Expand All @@ -45,8 +46,11 @@ extern "C" {
*
* @param size new initial size for printbuf (formatting buffer)
*/
extern void
fjson_global_set_printbuf_initial_size(int size);
extern void fjson_global_set_printbuf_initial_size(int size);
/**
* report the current libfastjson version
*/
extern const char *fjson_version(void);
#ifdef __cplusplus
}
#endif
Expand Down
22 changes: 0 additions & 22 deletions json_c_version.h

This file was deleted.

14 changes: 4 additions & 10 deletions json_c_version.c → json_version.c
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
/*
* Copyright (c) 2012 Eric Haszlakiewicz
* Copyright (c) 2016 Adiscon GmbH
* Rainer Gerhards <[email protected]>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See COPYING for details.
*/
#include "config.h"

#include "json_c_version.h"

const char *fjson_c_version(void)
const char *fjson_version(void)
{
return FJSON_VERSION;
return VERSION;
}

int fjson_c_version_num(void)
{
return FJSON_VERSION_NUM;
}

0 comments on commit 71c673f

Please sign in to comment.