Re: question on implementing C function with binary string as input and output

2014-04-07 Thread Perf Tech
Thanks Rob a lot for the great example! Wish it's included in the cookbook. On Sun, Apr 6, 2014 at 7:53 PM, wrote: > > > -Original Message- From: [email protected] > > I don't know (off the top of my head) how to concatenate binary strings >> in C ... >> > > Thankfully, perl

Re: question on implementing C function with binary string as input and output

2014-04-06 Thread sisyphus1
-Original Message- From: [email protected] I don't know (off the top of my head) how to concatenate binary strings in C ... Thankfully, perl's API provides a simple solution: ## use warnings; use strict; use Devel::Peek; use Inline C => Config

Re: question on implementing C function with binary string as input and output

2014-04-06 Thread sisyphus1
From: Perf Tech In another word, the C function should have the similar syntax as the following perl function. sub myRepeat { my $str = shift; return $str . $str; } I don't know (off the top of my head) how to concatenate binary strings in C, but the following demonstrates one way of succe