Fossil

Check-in [3acdc5e448]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:switched from vmprintf() to sqlite3_mprintf() to get the extra percent format modifiers.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3acdc5e448301cf942988ee7065477e87c369b3c
User & Date: stephan 2012-03-25 00:52:16.158
Context
2012-03-25
01:27
fixed a horrible varargs misuse. check-in: a596198ced user: stephan tags: trunk
00:52
switched from vmprintf() to sqlite3_mprintf() to get the extra percent format modifiers. check-in: 3acdc5e448 user: stephan tags: trunk
2012-03-24
21:05
Avoid adding HTML into the "patch" output. check-in: dce6af96eb user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/json.c.
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
}

cson_value * json_new_string_f( char const * fmt, ... ){
  cson_value * v;
  char * zStr;
  va_list vargs;
  va_start(vargs,fmt);
  zStr = vmprintf(fmt,vargs);
  va_end(vargs);
  v = cson_value_new_string(zStr, strlen(zStr));
  free(zStr);
  return v;  
}

cson_value * json_new_int( int v ){
  return cson_value_new_integer((cson_int_t)v);
}








|


|







376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
}

cson_value * json_new_string_f( char const * fmt, ... ){
  cson_value * v;
  char * zStr;
  va_list vargs;
  va_start(vargs,fmt);
  zStr = sqlite3_mprintf(fmt,vargs);
  va_end(vargs);
  v = cson_value_new_string(zStr, strlen(zStr));
  sqlite3_free(zStr);
  return v;  
}

cson_value * json_new_int( int v ){
  return cson_value_new_integer((cson_int_t)v);
}