/ Check-in [18bbcafc]
Login

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

Overview
Comment:Use memcpy() rather than "=" to copy a structure, in order to work around a bug in the XLC compiler on AIX. Ticket #3344. (CVS 6003)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:18bbcafc16bb985a7c74e07ffb9c4f28273a7cfd
User & Date: drh 2008-12-10 11:49:06
Context
2008-12-10
16:45
Add explicit casts to silence nuisance warnings from VC++. (CVS 6004) check-in: da1cbfa7 user: drh tags: trunk
11:49
Use memcpy() rather than "=" to copy a structure, in order to work around a bug in the XLC compiler on AIX. Ticket #3344. (CVS 6003) check-in: 18bbcafc user: drh tags: trunk
11:44
Remove some obsolete markup from sqlite.h.in. (CVS 6002) check-in: d1d05e2a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbemem.c.

    11     11   *************************************************************************
    12     12   **
    13     13   ** This file contains code use to manipulate "Mem" structure.  A "Mem"
    14     14   ** stores a single value in the VDBE.  Mem is an opaque structure visible
    15     15   ** only within the VDBE.  Interface routines refer to a Mem using the
    16     16   ** name sqlite_value
    17     17   **
    18         -** $Id: vdbemem.c,v 1.130 2008/12/09 02:51:24 drh Exp $
           18  +** $Id: vdbemem.c,v 1.131 2008/12/10 11:49:06 drh Exp $
    19     19   */
    20     20   #include "sqliteInt.h"
    21     21   #include <ctype.h>
    22     22   #include "vdbeInt.h"
    23     23   
    24     24   /*
    25     25   ** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)
................................................................................
   251    251       ctx.s.flags = MEM_Null;
   252    252       ctx.s.db = pMem->db;
   253    253       ctx.pMem = pMem;
   254    254       ctx.pFunc = pFunc;
   255    255       pFunc->xFinalize(&ctx);
   256    256       assert( 0==(pMem->flags&MEM_Dyn) && !pMem->xDel );
   257    257       sqlite3DbFree(pMem->db, pMem->zMalloc);
   258         -    *pMem = ctx.s;
          258  +    memcpy(pMem, &ctx.s, sizeof(ctx.s));
   259    259       rc = (ctx.isError?SQLITE_ERROR:SQLITE_OK);
   260    260     }
   261    261     return rc;
   262    262   }
   263    263   
   264    264   /*
   265    265   ** If the memory cell contains a string value that must be freed by