Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75810 - trunk/tools/build/v2/engine
From: steven_at_[hidden]
Date: 2011-12-04 21:43:26


Author: steven_watanabe
Date: 2011-12-04 21:43:25 EST (Sun, 04 Dec 2011)
New Revision: 75810
URL: http://svn.boost.org/trac/boost/changeset/75810

Log:
Fix alias violations.
Text files modified:
   trunk/tools/build/v2/engine/function.c | 32 ++++++++++++++------------------
   1 files changed, 14 insertions(+), 18 deletions(-)

Modified: trunk/tools/build/v2/engine/function.c
==============================================================================
--- trunk/tools/build/v2/engine/function.c (original)
+++ trunk/tools/build/v2/engine/function.c 2011-12-04 21:43:25 EST (Sun, 04 Dec 2011)
@@ -131,18 +131,14 @@
 
 typedef struct _builtin_function
 {
- int type;
- int reference_count;
- OBJECT * rulename;
+ FUNCTION base;
     LIST * ( * func )( FRAME *, int flags );
     int flags;
 } BUILTIN_FUNCTION;
 
 typedef struct _jam_function
 {
- int type;
- int reference_count;
- OBJECT * rulename;
+ FUNCTION base;
     instruction * code;
     int num_constants;
     OBJECT * * constants;
@@ -1183,10 +1179,10 @@
 {
     JAM_FUNCTION * result = BJAM_MALLOC( sizeof(JAM_FUNCTION) );
     int i;
- result->type = FUNCTION_JAM;
- result->reference_count = 1;
+ result->base.type = FUNCTION_JAM;
+ result->base.reference_count = 1;
 
- result->rulename = 0;
+ result->base.rulename = 0;
 
     result->code = BJAM_MALLOC( c->code->size * sizeof(instruction) );
     memcpy( result->code, c->code->data, c->code->size * sizeof(instruction) );
@@ -1236,7 +1232,7 @@
 
 typedef struct
 {
- int type;
+ VAR_PARSE base;
     VAR_PARSE_GROUP * name;
     VAR_PARSE_GROUP * subscript;
     struct dynamic_array modifiers[1];
@@ -1244,13 +1240,13 @@
 
 typedef struct
 {
- int type;
+ VAR_PARSE base;
     OBJECT * s;
 } VAR_PARSE_STRING;
 
 typedef struct
 {
- int type;
+ VAR_PARSE base;
     struct dynamic_array filename[1];
     struct dynamic_array contents[1];
 } VAR_PARSE_FILE;
@@ -1290,7 +1286,7 @@
     {
         string buf[1];
         VAR_PARSE_STRING * value = (VAR_PARSE_STRING *)BJAM_MALLOC( sizeof(VAR_PARSE_STRING) );
- value->type = VAR_PARSE_TYPE_STRING;
+ value->base.type = VAR_PARSE_TYPE_STRING;
         string_new( buf );
         string_append_range( buf, start, end );
         value->s = object_new( buf->value );
@@ -1306,7 +1302,7 @@
 static VAR_PARSE_VAR * var_parse_var_new()
 {
     VAR_PARSE_VAR * result = BJAM_MALLOC( sizeof( VAR_PARSE_VAR ) );
- result->type = VAR_PARSE_TYPE_VAR;
+ result->base.type = VAR_PARSE_TYPE_VAR;
     result->name = var_parse_group_new();
     result->subscript = 0;
     dynamic_array_init( result->modifiers );
@@ -1349,7 +1345,7 @@
 static VAR_PARSE_FILE * var_parse_file_new( void )
 {
     VAR_PARSE_FILE * result = (VAR_PARSE_FILE *)BJAM_MALLOC( sizeof( VAR_PARSE_FILE ) );
- result->type = VAR_PARSE_TYPE_FILE;
+ result->base.type = VAR_PARSE_TYPE_FILE;
     dynamic_array_init( result->filename );
     dynamic_array_init( result->contents );
     return result;
@@ -2411,9 +2407,9 @@
 FUNCTION * function_builtin( LIST * ( * func )( FRAME * frame, int flags ), int flags )
 {
     BUILTIN_FUNCTION * result = BJAM_MALLOC( sizeof( BUILTIN_FUNCTION ) );
- result->type = FUNCTION_BUILTIN;
- result->reference_count = 1;
- result->rulename = 0;
+ result->base.type = FUNCTION_BUILTIN;
+ result->base.reference_count = 1;
+ result->base.rulename = 0;
     result->func = func;
     result->flags = flags;
     return (FUNCTION *)result;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk