Ignore:
Timestamp:
May 18, 2018, 2:09:21 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
2472a19
Parents:
f6f0cca3 (diff), c7d8100c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/master' into with_gc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/general/evaluation/c-bench.c

    rf6f0cca3 rff29f08  
    55#include "c-stack.h"
    66
    7 char* new_char( char c ) {
    8         char* q = malloc(sizeof(char)); /***/
     7char * new_char( char c ) {
     8        char* q = malloc( sizeof(char) ); /***/
    99        *q = c;
    1010        return q;
    1111}
    1212
    13 short* new_short( short s ) {
    14         short* q = malloc(sizeof(short)); /***/
     13short * new_short( short s ) {
     14        short* q = malloc( sizeof(short) ); /***/
    1515        *q = s;
    1616        return q;
     
    1818
    1919int* new_int( int i ) {
    20         int* q = malloc(sizeof(int)); /***/
     20        int* q = malloc( sizeof(int) ); /***/
    2121        *q = i;
    2222        return q;
    2323}
    2424
    25 void* copy_char( const void* p ) { return new_char( *(const char*)p ); } /***/
    26 void* copy_short( const void* p ) { return new_short( *(const short*)p ); } /***/
    27 void* copy_int( const void* p ) { return new_int( *(const int*)p ); } /***/
    28 void* copy_pair_short_char( const void* p ) { return copy_pair( p, copy_short, copy_char ); } /***/
    29 void free_pair_short_char( void* p ) { free_pair( p, free, free ); } /***/
     25void * copy_char( const void * p ) { return new_char( *(const char*)p ); } /***/
     26void * copy_short( const void * p ) { return new_short( *(const short*)p ); } /***/
     27void * copy_int( const void * p ) { return new_int( *(const int*)p ); } /***/
     28void * copy_pair_short_char( const void * p ) { return copy_pair( p, copy_short, copy_char ); } /***/
     29void free_pair_short_char( void * p ) { free_pair( p, free, free ); } /***/
    3030
    3131int cmp_char( const void* a, const void* b ) { /***/
     
    3737}
    3838
    39 int main(int argc, char** argv) {
     39int main(int argc, char * argv[] ) {
    4040        int maxi = 0, vali = 42;
    4141        struct stack si = new_stack(), ti;
Note: See TracChangeset for help on using the changeset viewer.