Check-in [37f218e272]
Overview
Comment:Corrected issue with checking for variables
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 37f218e27288dcbbd1c44378c3f5d0f98b1d01c7
User & Date: rkeene on 2014-07-16 16:15:56
Other Links: manifest | tags
Context
2014-07-16
16:26
Cleaned up some return code handling, and added test for binary blobs check-in: 1c563bb769 user: rkeene tags: trunk
16:15
Corrected issue with checking for variables check-in: 37f218e272 user: rkeene tags: trunk
16:09
Added syntaxes for byte arrays check-in: 17b2b81a02 user: rkeene tags: trunk
Changes

Modified tcc4tcl.tcl from [2aaf108bbf] to [f995e1562e].

   259    259   						}
   260    260   					}
   261    261   
   262    262   					_ccode $handle "    _$arg = Tcl_New${convCmd}Obj($arg);"
   263    263   					_ccode $handle "    if (!_$arg) $return_failure;"
   264    264   				}
   265    265   				char* {
   266         -					if {[info exists $types(${arg}_MemberCount)] && [info exists $types(${arg}_MemberLength)]} {
          266  +					if {[info exists types(${arg}_MemberCount)] && [info exists types(${arg}_MemberLength)]} {
   267    267   						_ccode $handle "    _$arg = Tcl_NewByteArrayObj($arg, ${arg}_MemberCount * ${arg}_MemberLength);"
   268         -					} elseif {[info exists $types(${arg}_Length)]} {
          268  +					} elseif {[info exists types(${arg}_Length)]} {
   269    269   						_ccode $handle "    _$arg = Tcl_NewByteArrayObj($arg, ${arg}_Length);"
   270    270   					} else {
   271    271   						_ccode $handle "    _$arg = Tcl_NewStringObj($arg, -1);"
   272    272   					}
   273    273   				}
   274    274   				Tcl_Obj* {
   275    275   					_ccode $handle "    _$arg = $arg;"

Modified test.tcl from [907e91664c] to [635afa0e0c].

   164    164   set handle [tcc4tcl::new]
   165    165   $handle proc callToTcl1 {int x} float {
   166    166   	return 0.1
   167    167   }
   168    168   $handle cwrap callToTcl1 {int x} float
   169    169   $handle go
   170    170   puts [callToTcl1 3]
          171  +
          172  +set handle [tcc4tcl::new]
          173  +$handle proc callToTclBinary {char* blob int blob_Length} ok {
          174  +	puts "Blob: $blob"
          175  +}