Check-in [9dea15950f]
Overview
Comment:Updated to correctly define C functions that take no arguments (void)
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9dea15950fce16bbc8af64ff815baa311a2c2700
User & Date: rkeene on 2014-06-23 01:45:05
Other Links: manifest | tags
Context
2014-06-23
01:45
Updated to omit the #define for functions we are just wrapping check-in: 491d3ace1e user: rkeene tags: trunk
01:45
Updated to correctly define C functions that take no arguments (void) check-in: 9dea15950f user: rkeene tags: trunk
01:40
Added more tests check-in: 035bcc0134 user: rkeene tags: trunk
Changes

Modified tcc4tcl.tcl from [8158b2225d] to [341f854450].

   317    317   		default {
   318    318   			set rtype2 $rtype
   319    319   		}
   320    320   	}
   321    321   
   322    322   	# Create wrapped function
   323    323   	if {$body ne "#"} {
   324         -		append code "static $rtype2 ${cname}([join $cargs {, }]) \{\n"
          324  +		if {[llength $cargs] != 0} {
          325  +			set cargs_str [join $cargs {, }]
          326  +		} else {
          327  +			set cargs_str "void"
          328  +		}
          329  +		append code "static $rtype2 ${cname}($cargs_str) \{\n"
   325    330   		append code $body
   326    331   		append code "\}\n"
   327    332   	} else {
   328    333   		append code "#define $cname [namespace tail $name]" "\n"
   329    334   	}
   330    335   
   331    336   	# Create wrapper function