Changes in tests/exceptions/except-2.cfa [3b9c674:c0b2a631]
- File:
-
- 1 edited
-
tests/exceptions/except-2.cfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/exceptions/except-2.cfa
r3b9c674 rc0b2a631 12 12 struct TABLE(BASE_EXCEPT) const * parent; 13 13 size_t size; 14 void (*copy)(num_error &this, num_error &other);15 void (*free)(num_error &this);14 void (*copy)(num_error *this, num_error * other); 15 void (*free)(num_error *this); 16 16 const char * (*msg)(num_error *this); 17 17 int (*code)(num_error *this); … … 28 28 if ( ! this->msg ) { 29 29 static const char * base = "Num Error with code: X"; 30 this->msg = (char *)malloc(22);30 this->msg = malloc(22); 31 31 for (int i = 0 ; (this->msg[i] = base[i]) ; ++i); 32 32 } … … 34 34 return this->msg; 35 35 } 36 void ?{}(num_error &this, int num) {37 this .virtual_table = &INSTANCE(num_error);38 this .msg = 0;39 this .num = num;36 void ?{}(num_error * this, int num) { 37 this->virtual_table = &INSTANCE(num_error); 38 this->msg = 0; 39 this->num = num; 40 40 } 41 void ?{}(num_error & this, num_error &other) {42 this .virtual_table = other.virtual_table;43 this .msg = 0;44 this .num = other.num;41 void ?{}(num_error * this, num_error * other) { 42 this->virtual_table = other->virtual_table; 43 this->msg = 0; 44 this->num = other->num; 45 45 } 46 void ^?{}(num_error &this) {47 if( this .msg ) free( this.msg );46 void ^?{}(num_error * this) { 47 if( this->msg ) free( this->msg ); 48 48 } 49 49 int num_error_code( num_error * this ) {
Note:
See TracChangeset
for help on using the changeset viewer.