SQLite Forum

In sqlite3session.c there is a C99 comment
Login

In sqlite3session.c there is a C99 comment

(1) By anonymous on 2024-01-11 13:58:01 [source]

In https://www.sqlite.org/src/file?name=ext/session/sqlite3session.c&ci=trunk there is a C99 comment:
======
void sqlite3session_delete(sqlite3_session *pSession){
...
  /* Assert that all allocations have been freed and then free the 
  ** session object itself. */
  // assert( pSession->nMalloc==0 ); ///////!!!!!! here
  sqlite3_free(pSession);
}
======

(2) By anonymous on 2024-01-11 14:59:56 in reply to 1 [link] [source]

I mean a C++ comment intead of C99 comment.

I discovered it because I was preprocessing sqlite.c and specified "-std=c89" that is what sqlite3 is aiming for.

(3) By Stephan Beal (stephan) on 2024-01-11 15:03:23 in reply to 2 [link] [source]

I mean a C++ comment intead of C99 comment.

Same thing ;).

It's been fixed. Thank you for the report!

(4.1) By Domingo (mingodad) on 2024-01-14 13:26:51 edited from 4.0 in reply to 3 [link] [source]

Just recently this function appeared:
=====
static sqlite3_int64 genSeqMember(sqlite3_int64 smBase,
                                  sqlite3_int64 smStep,
                                  sqlite3_uint64 ix){
  if( ix>=(sqlite3_uint64)LLONG_MAX ){

    ix -= (sqlite3_uint64)LLONG_MAX;
    smBase += LLONG_MAX * smStep;
  }
  return smBase + ((sqlite3_int64)ix)*smStep;
}
=====
But LLONG_MAX is a C99 macro see here https://en.cppreference.com/w/c/types/limits .