Index: tcc4tcl.tcl ================================================================== --- tcc4tcl.tcl +++ tcc4tcl.tcl @@ -261,13 +261,13 @@ _ccode $handle " _$arg = Tcl_New${convCmd}Obj($arg);" _ccode $handle " if (!_$arg) $return_failure;" } char* { - if {[info exists $types(${arg}_MemberCount)] && [info exists $types(${arg}_MemberLength)]} { + if {[info exists types(${arg}_MemberCount)] && [info exists types(${arg}_MemberLength)]} { _ccode $handle " _$arg = Tcl_NewByteArrayObj($arg, ${arg}_MemberCount * ${arg}_MemberLength);" - } elseif {[info exists $types(${arg}_Length)]} { + } elseif {[info exists types(${arg}_Length)]} { _ccode $handle " _$arg = Tcl_NewByteArrayObj($arg, ${arg}_Length);" } else { _ccode $handle " _$arg = Tcl_NewStringObj($arg, -1);" } } Index: test.tcl ================================================================== --- test.tcl +++ test.tcl @@ -166,5 +166,10 @@ return 0.1 } $handle cwrap callToTcl1 {int x} float $handle go puts [callToTcl1 3] + +set handle [tcc4tcl::new] +$handle proc callToTclBinary {char* blob int blob_Length} ok { + puts "Blob: $blob" +}