Fossil SCM

Minor internal tweaks. Pulled in lastest cson_amalgamation for the new convenience functions.

stephan 2011-10-07 06:54 json-multitag-test
Commit c75759d8d0cf9a38cea0158e565e9c4c1de010f7
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1595,17 +1595,27 @@
15951595
static const cson_value cson_value_double_empty = { &cson_value_api_double, NULL, 0 };
15961596
static const cson_value cson_value_string_empty = { &cson_value_api_string, NULL, 0 };
15971597
static const cson_value cson_value_array_empty = { &cson_value_api_array, NULL, 0 };
15981598
static const cson_value cson_value_object_empty = { &cson_value_api_object, NULL, 0 };
15991599
1600
-
16011600
struct cson_string
16021601
{
16031602
unsigned int length;
16041603
};
16051604
#define cson_string_empty_m {0/*length*/}
16061605
static const cson_string cson_string_empty = cson_string_empty_m;
1606
+
1607
+
1608
+
1609
+#define CSON_CAST(T,V) ((T*)((V)->value))
1610
+#define CSON_VCAST(V) ((cson_value *)(((unsigned char *)(V))-sizeof(cson_value)))
1611
+#define CSON_INT(V) ((cson_int_t*)(V)->value)
1612
+#define CSON_DBL(V) CSON_CAST(cson_double_t,(V))
1613
+#define CSON_STR(V) CSON_CAST(cson_string,(V))
1614
+#define CSON_OBJ(V) CSON_CAST(cson_object,(V))
1615
+#define CSON_ARRAY(V) CSON_CAST(cson_array,(V))
1616
+
16071617
/**
16081618
16091619
Holds special shared "constant" (though they are non-const)
16101620
values.
16111621
@@ -1876,11 +1886,11 @@
18761886
allocated in a single chunk of memory, and the cson_string object
18771887
does not directly provide (or have) a pointer to the string bytes.
18781888
*/
18791889
static cson_string * cson_string_alloc(unsigned int len)
18801890
{
1881
- if( ! len ) return &CSON_EMPTY_HOLDER.stringValue;
1891
+ if( ! len ) return CSON_STR(&CSON_SPECIAL_VALUES[CSON_VAL_STR_EMPTY]);
18821892
else
18831893
{
18841894
cson_string * s = NULL;
18851895
const size_t msz = sizeof(cson_string) + len + 1 /*NUL*/;
18861896
unsigned char * mem = NULL;
@@ -2265,18 +2275,10 @@
22652275
@see cson_value_new_bool()
22662276
@see cson_value_free()
22672277
*/
22682278
static cson_value * cson_value_new(cson_type_id t, size_t extra);
22692279
2270
-#define CSON_CAST(T,V) ((T*)((V)->value))
2271
-#define CSON_VCAST(V) ((cson_value *)(((unsigned char *)(V))-sizeof(cson_value)))
2272
-#define CSON_INT(V) ((cson_int_t*)(V)->value)
2273
-#define CSON_DBL(V) CSON_CAST(cson_double_t,(V))
2274
-#define CSON_STR(V) CSON_CAST(cson_string,(V))
2275
-#define CSON_OBJ(V) CSON_CAST(cson_object,(V))
2276
-#define CSON_ARRAY(V) CSON_CAST(cson_array,(V))
2277
-
22782280
cson_value * cson_value_new(cson_type_id t, size_t extra)
22792281
{
22802282
static const size_t vsz = sizeof(cson_value);
22812283
const size_t sz = vsz + extra;
22822284
size_t tx = 0;
@@ -2420,16 +2422,28 @@
24202422
24212423
cson_value * cson_value_new_object()
24222424
{
24232425
return cson_value_object_alloc();
24242426
}
2427
+
2428
+cson_object * cson_new_object()
2429
+{
2430
+
2431
+ return cson_value_get_object( cson_value_new_object() );
2432
+}
24252433
24262434
cson_value * cson_value_new_array()
24272435
{
24282436
return cson_value_array_alloc();
24292437
}
24302438
2439
+
2440
+cson_array * cson_new_array()
2441
+{
2442
+ return cson_value_get_array( cson_value_new_array() );
2443
+}
2444
+
24312445
/**
24322446
Frees kvp->key and kvp->value and sets them to NULL, but does not free
24332447
kvp. If !kvp then this is a no-op.
24342448
*/
24352449
static void cson_kvp_clean( cson_kvp * kvp )
@@ -2941,31 +2955,38 @@
29412955
*CSON_DBL(c) = v;
29422956
}
29432957
return c;
29442958
}
29452959
}
2946
-cson_value * cson_value_new_string( char const * str, unsigned int len )
2960
+
2961
+cson_string const * cson_new_string(char const * str, unsigned int len)
29472962
{
2948
- if( !str || !*str || !len ) return &CSON_SPECIAL_VALUES[CSON_VAL_STR_EMPTY];
2963
+ if( !str || !*str || !len ) return &CSON_EMPTY_HOLDER.stringValue;
29492964
else
29502965
{
29512966
cson_value * c = cson_value_new(CSON_TYPE_STRING, len + 1/*NUL byte*/);
2967
+ cson_string * s = NULL;
29522968
if( c )
29532969
{
29542970
char * dest = NULL;
2955
- cson_string * s = CSON_STR(c);
2971
+ s = CSON_STR(c);
29562972
*s = cson_string_empty;
29572973
assert( NULL != s );
29582974
s->length = len;
29592975
dest = cson_string_str(s);
29602976
assert( NULL != dest );
29612977
memcpy( dest, str, len );
29622978
dest[len] = 0;
29632979
}
2964
- return c;
2980
+ return s;
29652981
}
29662982
}
2983
+
2984
+cson_value * cson_value_new_string( char const * str, unsigned int len )
2985
+{
2986
+ return cson_string_value( cson_new_string(str, len) );
2987
+}
29672988
29682989
int cson_array_value_fetch( cson_array const * ar, unsigned int pos, cson_value ** v )
29692990
{
29702991
if( !ar) return cson_rc.ArgError;
29712992
if( pos >= ar->list.count ) return cson_rc.RangeError;
@@ -4676,13 +4697,15 @@
46764697
}
46774698
}
46784699
46794700
cson_value * cson_string_value(cson_string const * s)
46804701
{
4702
+#define MT CSON_SPECIAL_VALUES[CSON_VAL_STR_EMPTY]
46814703
return s
4682
- ? CSON_VCAST(s)
4704
+ ? ((s==MT.value) ? &MT : CSON_VCAST(s))
46834705
: NULL;
4706
+#undef MT
46844707
}
46854708
46864709
cson_value * cson_object_value(cson_object const * s)
46874710
{
46884711
return s
46894712
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1595,17 +1595,27 @@
1595 static const cson_value cson_value_double_empty = { &cson_value_api_double, NULL, 0 };
1596 static const cson_value cson_value_string_empty = { &cson_value_api_string, NULL, 0 };
1597 static const cson_value cson_value_array_empty = { &cson_value_api_array, NULL, 0 };
1598 static const cson_value cson_value_object_empty = { &cson_value_api_object, NULL, 0 };
1599
1600
1601 struct cson_string
1602 {
1603 unsigned int length;
1604 };
1605 #define cson_string_empty_m {0/*length*/}
1606 static const cson_string cson_string_empty = cson_string_empty_m;
 
 
 
 
 
 
 
 
 
 
 
1607 /**
1608
1609 Holds special shared "constant" (though they are non-const)
1610 values.
1611
@@ -1876,11 +1886,11 @@
1876 allocated in a single chunk of memory, and the cson_string object
1877 does not directly provide (or have) a pointer to the string bytes.
1878 */
1879 static cson_string * cson_string_alloc(unsigned int len)
1880 {
1881 if( ! len ) return &CSON_EMPTY_HOLDER.stringValue;
1882 else
1883 {
1884 cson_string * s = NULL;
1885 const size_t msz = sizeof(cson_string) + len + 1 /*NUL*/;
1886 unsigned char * mem = NULL;
@@ -2265,18 +2275,10 @@
2265 @see cson_value_new_bool()
2266 @see cson_value_free()
2267 */
2268 static cson_value * cson_value_new(cson_type_id t, size_t extra);
2269
2270 #define CSON_CAST(T,V) ((T*)((V)->value))
2271 #define CSON_VCAST(V) ((cson_value *)(((unsigned char *)(V))-sizeof(cson_value)))
2272 #define CSON_INT(V) ((cson_int_t*)(V)->value)
2273 #define CSON_DBL(V) CSON_CAST(cson_double_t,(V))
2274 #define CSON_STR(V) CSON_CAST(cson_string,(V))
2275 #define CSON_OBJ(V) CSON_CAST(cson_object,(V))
2276 #define CSON_ARRAY(V) CSON_CAST(cson_array,(V))
2277
2278 cson_value * cson_value_new(cson_type_id t, size_t extra)
2279 {
2280 static const size_t vsz = sizeof(cson_value);
2281 const size_t sz = vsz + extra;
2282 size_t tx = 0;
@@ -2420,16 +2422,28 @@
2420
2421 cson_value * cson_value_new_object()
2422 {
2423 return cson_value_object_alloc();
2424 }
 
 
 
 
 
 
2425
2426 cson_value * cson_value_new_array()
2427 {
2428 return cson_value_array_alloc();
2429 }
2430
 
 
 
 
 
 
2431 /**
2432 Frees kvp->key and kvp->value and sets them to NULL, but does not free
2433 kvp. If !kvp then this is a no-op.
2434 */
2435 static void cson_kvp_clean( cson_kvp * kvp )
@@ -2941,31 +2955,38 @@
2941 *CSON_DBL(c) = v;
2942 }
2943 return c;
2944 }
2945 }
2946 cson_value * cson_value_new_string( char const * str, unsigned int len )
 
2947 {
2948 if( !str || !*str || !len ) return &CSON_SPECIAL_VALUES[CSON_VAL_STR_EMPTY];
2949 else
2950 {
2951 cson_value * c = cson_value_new(CSON_TYPE_STRING, len + 1/*NUL byte*/);
 
2952 if( c )
2953 {
2954 char * dest = NULL;
2955 cson_string * s = CSON_STR(c);
2956 *s = cson_string_empty;
2957 assert( NULL != s );
2958 s->length = len;
2959 dest = cson_string_str(s);
2960 assert( NULL != dest );
2961 memcpy( dest, str, len );
2962 dest[len] = 0;
2963 }
2964 return c;
2965 }
2966 }
 
 
 
 
 
2967
2968 int cson_array_value_fetch( cson_array const * ar, unsigned int pos, cson_value ** v )
2969 {
2970 if( !ar) return cson_rc.ArgError;
2971 if( pos >= ar->list.count ) return cson_rc.RangeError;
@@ -4676,13 +4697,15 @@
4676 }
4677 }
4678
4679 cson_value * cson_string_value(cson_string const * s)
4680 {
 
4681 return s
4682 ? CSON_VCAST(s)
4683 : NULL;
 
4684 }
4685
4686 cson_value * cson_object_value(cson_object const * s)
4687 {
4688 return s
4689
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -1595,17 +1595,27 @@
1595 static const cson_value cson_value_double_empty = { &cson_value_api_double, NULL, 0 };
1596 static const cson_value cson_value_string_empty = { &cson_value_api_string, NULL, 0 };
1597 static const cson_value cson_value_array_empty = { &cson_value_api_array, NULL, 0 };
1598 static const cson_value cson_value_object_empty = { &cson_value_api_object, NULL, 0 };
1599
 
1600 struct cson_string
1601 {
1602 unsigned int length;
1603 };
1604 #define cson_string_empty_m {0/*length*/}
1605 static const cson_string cson_string_empty = cson_string_empty_m;
1606
1607
1608
1609 #define CSON_CAST(T,V) ((T*)((V)->value))
1610 #define CSON_VCAST(V) ((cson_value *)(((unsigned char *)(V))-sizeof(cson_value)))
1611 #define CSON_INT(V) ((cson_int_t*)(V)->value)
1612 #define CSON_DBL(V) CSON_CAST(cson_double_t,(V))
1613 #define CSON_STR(V) CSON_CAST(cson_string,(V))
1614 #define CSON_OBJ(V) CSON_CAST(cson_object,(V))
1615 #define CSON_ARRAY(V) CSON_CAST(cson_array,(V))
1616
1617 /**
1618
1619 Holds special shared "constant" (though they are non-const)
1620 values.
1621
@@ -1876,11 +1886,11 @@
1886 allocated in a single chunk of memory, and the cson_string object
1887 does not directly provide (or have) a pointer to the string bytes.
1888 */
1889 static cson_string * cson_string_alloc(unsigned int len)
1890 {
1891 if( ! len ) return CSON_STR(&CSON_SPECIAL_VALUES[CSON_VAL_STR_EMPTY]);
1892 else
1893 {
1894 cson_string * s = NULL;
1895 const size_t msz = sizeof(cson_string) + len + 1 /*NUL*/;
1896 unsigned char * mem = NULL;
@@ -2265,18 +2275,10 @@
2275 @see cson_value_new_bool()
2276 @see cson_value_free()
2277 */
2278 static cson_value * cson_value_new(cson_type_id t, size_t extra);
2279
 
 
 
 
 
 
 
 
2280 cson_value * cson_value_new(cson_type_id t, size_t extra)
2281 {
2282 static const size_t vsz = sizeof(cson_value);
2283 const size_t sz = vsz + extra;
2284 size_t tx = 0;
@@ -2420,16 +2422,28 @@
2422
2423 cson_value * cson_value_new_object()
2424 {
2425 return cson_value_object_alloc();
2426 }
2427
2428 cson_object * cson_new_object()
2429 {
2430
2431 return cson_value_get_object( cson_value_new_object() );
2432 }
2433
2434 cson_value * cson_value_new_array()
2435 {
2436 return cson_value_array_alloc();
2437 }
2438
2439
2440 cson_array * cson_new_array()
2441 {
2442 return cson_value_get_array( cson_value_new_array() );
2443 }
2444
2445 /**
2446 Frees kvp->key and kvp->value and sets them to NULL, but does not free
2447 kvp. If !kvp then this is a no-op.
2448 */
2449 static void cson_kvp_clean( cson_kvp * kvp )
@@ -2941,31 +2955,38 @@
2955 *CSON_DBL(c) = v;
2956 }
2957 return c;
2958 }
2959 }
2960
2961 cson_string const * cson_new_string(char const * str, unsigned int len)
2962 {
2963 if( !str || !*str || !len ) return &CSON_EMPTY_HOLDER.stringValue;
2964 else
2965 {
2966 cson_value * c = cson_value_new(CSON_TYPE_STRING, len + 1/*NUL byte*/);
2967 cson_string * s = NULL;
2968 if( c )
2969 {
2970 char * dest = NULL;
2971 s = CSON_STR(c);
2972 *s = cson_string_empty;
2973 assert( NULL != s );
2974 s->length = len;
2975 dest = cson_string_str(s);
2976 assert( NULL != dest );
2977 memcpy( dest, str, len );
2978 dest[len] = 0;
2979 }
2980 return s;
2981 }
2982 }
2983
2984 cson_value * cson_value_new_string( char const * str, unsigned int len )
2985 {
2986 return cson_string_value( cson_new_string(str, len) );
2987 }
2988
2989 int cson_array_value_fetch( cson_array const * ar, unsigned int pos, cson_value ** v )
2990 {
2991 if( !ar) return cson_rc.ArgError;
2992 if( pos >= ar->list.count ) return cson_rc.RangeError;
@@ -4676,13 +4697,15 @@
4697 }
4698 }
4699
4700 cson_value * cson_string_value(cson_string const * s)
4701 {
4702 #define MT CSON_SPECIAL_VALUES[CSON_VAL_STR_EMPTY]
4703 return s
4704 ? ((s==MT.value) ? &MT : CSON_VCAST(s))
4705 : NULL;
4706 #undef MT
4707 }
4708
4709 cson_value * cson_object_value(cson_object const * s)
4710 {
4711 return s
4712
--- src/cson_amalgamation.h
+++ src/cson_amalgamation.h
@@ -1205,10 +1205,42 @@
12051205
@see cson_value_new_array()
12061206
@see cson_value_free()
12071207
*/
12081208
cson_value * cson_value_new_object();
12091209
1210
+/**
1211
+ This works like cson_value_new_object() but returns an Object
1212
+ handle directly.
1213
+
1214
+ The value handle for the returned object can be fetched with
1215
+ cson_object_value(theObject).
1216
+
1217
+ Ownership is transfered to the caller, who must eventually free it
1218
+ by passing the Value handle (NOT the Object handle) to
1219
+ cson_value_free() or passing ownership to a parent container.
1220
+
1221
+ Returns NULL on error (out of memory).
1222
+*/
1223
+cson_object * cson_new_object();
1224
+
1225
+/**
1226
+ Identical to cson_new_object() except that it creates
1227
+ an Array.
1228
+*/
1229
+cson_array * cson_new_array();
1230
+
1231
+/**
1232
+ Identical to cson_new_object() except that it creates
1233
+ a String.
1234
+
1235
+ ACHTUNG: this function returns a const pointer but the ownership of
1236
+ the memory belongs to the caller! Use cson_string_value() to fetch
1237
+ the Value handle, and then cson_value_free() that handle or insert
1238
+ it into a container to transfer ownership.
1239
+*/
1240
+cson_string const * cson_new_string(char const * val, unsigned int len);
1241
+
12101242
/**
12111243
Allocates a new "array" value and transfers ownership of it to the
12121244
caller. It must eventually be destroyed, by the caller or its
12131245
owning container, by passing it to cson_value_free().
12141246
12151247
--- src/cson_amalgamation.h
+++ src/cson_amalgamation.h
@@ -1205,10 +1205,42 @@
1205 @see cson_value_new_array()
1206 @see cson_value_free()
1207 */
1208 cson_value * cson_value_new_object();
1209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1210 /**
1211 Allocates a new "array" value and transfers ownership of it to the
1212 caller. It must eventually be destroyed, by the caller or its
1213 owning container, by passing it to cson_value_free().
1214
1215
--- src/cson_amalgamation.h
+++ src/cson_amalgamation.h
@@ -1205,10 +1205,42 @@
1205 @see cson_value_new_array()
1206 @see cson_value_free()
1207 */
1208 cson_value * cson_value_new_object();
1209
1210 /**
1211 This works like cson_value_new_object() but returns an Object
1212 handle directly.
1213
1214 The value handle for the returned object can be fetched with
1215 cson_object_value(theObject).
1216
1217 Ownership is transfered to the caller, who must eventually free it
1218 by passing the Value handle (NOT the Object handle) to
1219 cson_value_free() or passing ownership to a parent container.
1220
1221 Returns NULL on error (out of memory).
1222 */
1223 cson_object * cson_new_object();
1224
1225 /**
1226 Identical to cson_new_object() except that it creates
1227 an Array.
1228 */
1229 cson_array * cson_new_array();
1230
1231 /**
1232 Identical to cson_new_object() except that it creates
1233 a String.
1234
1235 ACHTUNG: this function returns a const pointer but the ownership of
1236 the memory belongs to the caller! Use cson_string_value() to fetch
1237 the Value handle, and then cson_value_free() that handle or insert
1238 it into a container to transfer ownership.
1239 */
1240 cson_string const * cson_new_string(char const * val, unsigned int len);
1241
1242 /**
1243 Allocates a new "array" value and transfers ownership of it to the
1244 caller. It must eventually be destroyed, by the caller or its
1245 owning container, by passing it to cson_value_free().
1246
1247
+3 -2
--- src/json.c
+++ src/json.c
@@ -43,10 +43,11 @@
4343
4444
const FossilJsonKeys_ FossilJsonKeys = {
4545
"anonymousSeed" /*anonymousSeed*/,
4646
"authToken" /*authToken*/,
4747
"COMMAND_PATH" /*commandPath*/,
48
+ "mtime" /*mtime*/,
4849
"payload" /* payload */,
4950
"requestId" /*requestId*/,
5051
"resultCode" /*resultCode*/,
5152
"resultText" /*resultText*/,
5253
"timestamp" /*timestamp*/
@@ -1341,12 +1342,12 @@
13411342
cson_value * v = NULL;
13421343
cson_value * tmp = NULL;
13431344
cson_object * o = NULL;
13441345
int rc;
13451346
resultCode = json_dumbdown_rc(resultCode);
1346
- v = cson_value_new_object();
1347
- o = cson_value_get_object(v);
1347
+ o = cson_new_object();
1348
+ v = cson_object_value(o);
13481349
if( ! o ) return NULL;
13491350
#define SET(K) if(!tmp) goto cleanup; \
13501351
rc = cson_object_set( o, K, tmp ); \
13511352
if(rc) do{\
13521353
cson_value_free(tmp); \
13531354
--- src/json.c
+++ src/json.c
@@ -43,10 +43,11 @@
43
44 const FossilJsonKeys_ FossilJsonKeys = {
45 "anonymousSeed" /*anonymousSeed*/,
46 "authToken" /*authToken*/,
47 "COMMAND_PATH" /*commandPath*/,
 
48 "payload" /* payload */,
49 "requestId" /*requestId*/,
50 "resultCode" /*resultCode*/,
51 "resultText" /*resultText*/,
52 "timestamp" /*timestamp*/
@@ -1341,12 +1342,12 @@
1341 cson_value * v = NULL;
1342 cson_value * tmp = NULL;
1343 cson_object * o = NULL;
1344 int rc;
1345 resultCode = json_dumbdown_rc(resultCode);
1346 v = cson_value_new_object();
1347 o = cson_value_get_object(v);
1348 if( ! o ) return NULL;
1349 #define SET(K) if(!tmp) goto cleanup; \
1350 rc = cson_object_set( o, K, tmp ); \
1351 if(rc) do{\
1352 cson_value_free(tmp); \
1353
--- src/json.c
+++ src/json.c
@@ -43,10 +43,11 @@
43
44 const FossilJsonKeys_ FossilJsonKeys = {
45 "anonymousSeed" /*anonymousSeed*/,
46 "authToken" /*authToken*/,
47 "COMMAND_PATH" /*commandPath*/,
48 "mtime" /*mtime*/,
49 "payload" /* payload */,
50 "requestId" /*requestId*/,
51 "resultCode" /*resultCode*/,
52 "resultText" /*resultText*/,
53 "timestamp" /*timestamp*/
@@ -1341,12 +1342,12 @@
1342 cson_value * v = NULL;
1343 cson_value * tmp = NULL;
1344 cson_object * o = NULL;
1345 int rc;
1346 resultCode = json_dumbdown_rc(resultCode);
1347 o = cson_new_object();
1348 v = cson_object_value(o);
1349 if( ! o ) return NULL;
1350 #define SET(K) if(!tmp) goto cleanup; \
1351 rc = cson_object_set( o, K, tmp ); \
1352 if(rc) do{\
1353 cson_value_free(tmp); \
1354
--- src/json_detail.h
+++ src/json_detail.h
@@ -157,10 +157,11 @@
157157
typedef struct FossilJsonKeys_{
158158
/** maintainers: please keep alpha sorted (case-insensitive) */
159159
char const * anonymousSeed;
160160
char const * authToken;
161161
char const * commandPath;
162
+ char const * mtime;
162163
char const * payload;
163164
char const * requestId;
164165
char const * resultCode;
165166
char const * resultText;
166167
char const * timestamp;
167168
--- src/json_detail.h
+++ src/json_detail.h
@@ -157,10 +157,11 @@
157 typedef struct FossilJsonKeys_{
158 /** maintainers: please keep alpha sorted (case-insensitive) */
159 char const * anonymousSeed;
160 char const * authToken;
161 char const * commandPath;
 
162 char const * payload;
163 char const * requestId;
164 char const * resultCode;
165 char const * resultText;
166 char const * timestamp;
167
--- src/json_detail.h
+++ src/json_detail.h
@@ -157,10 +157,11 @@
157 typedef struct FossilJsonKeys_{
158 /** maintainers: please keep alpha sorted (case-insensitive) */
159 char const * anonymousSeed;
160 char const * authToken;
161 char const * commandPath;
162 char const * mtime;
163 char const * payload;
164 char const * requestId;
165 char const * resultCode;
166 char const * resultText;
167 char const * timestamp;
168
+1 -1
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -89,11 +89,11 @@
8989
cson_object * pay = cson_value_get_object(payV);
9090
cson_object_set(pay,"name",json_new_string(zPageName));
9191
cson_object_set(pay,"uuid",json_new_string(zUuid));
9292
free(zUuid);
9393
zUuid = NULL;
94
- cson_object_set(pay,"rid",json_new_int((cson_int_t)rid));
94
+ /*cson_object_set(pay,"rid",json_new_int((cson_int_t)rid));*/
9595
cson_object_set(pay,"lastSavedBy",json_new_string(pWiki->zUser));
9696
cson_object_set(pay,FossilJsonKeys.timestamp, json_julian_to_timestamp(pWiki->rDate));
9797
cson_object_set(pay,"contentFormat",json_new_string(zFormat));
9898
if( doParse ){
9999
Blob content = empty_blob;
100100
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -89,11 +89,11 @@
89 cson_object * pay = cson_value_get_object(payV);
90 cson_object_set(pay,"name",json_new_string(zPageName));
91 cson_object_set(pay,"uuid",json_new_string(zUuid));
92 free(zUuid);
93 zUuid = NULL;
94 cson_object_set(pay,"rid",json_new_int((cson_int_t)rid));
95 cson_object_set(pay,"lastSavedBy",json_new_string(pWiki->zUser));
96 cson_object_set(pay,FossilJsonKeys.timestamp, json_julian_to_timestamp(pWiki->rDate));
97 cson_object_set(pay,"contentFormat",json_new_string(zFormat));
98 if( doParse ){
99 Blob content = empty_blob;
100
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -89,11 +89,11 @@
89 cson_object * pay = cson_value_get_object(payV);
90 cson_object_set(pay,"name",json_new_string(zPageName));
91 cson_object_set(pay,"uuid",json_new_string(zUuid));
92 free(zUuid);
93 zUuid = NULL;
94 /*cson_object_set(pay,"rid",json_new_int((cson_int_t)rid));*/
95 cson_object_set(pay,"lastSavedBy",json_new_string(pWiki->zUser));
96 cson_object_set(pay,FossilJsonKeys.timestamp, json_julian_to_timestamp(pWiki->rDate));
97 cson_object_set(pay,"contentFormat",json_new_string(zFormat));
98 if( doParse ){
99 Blob content = empty_blob;
100

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button