That's void* in the interface code. You can of course use appropriate types in the application libraries. We will do the data handling and casting in the interface code, not in the core CCTW feature sections.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I would like to sketch the Tcl interface to this. It will consume a void* (chunk from the network) and produce the output list. Where should I look for the closest current interface? Or should I just make a dummy application feature for now?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you OK dealing with tcl byte array objects? As produced by Tcl_NewByteArrayObj for example
Since we're using SWIG, we just want to pass simple pointers through. So void* would be best as in commit a70501f..
Last edit: Justin M Wozniak 2014-05-05
That's void* in the interface code. You can of course use appropriate types in the application libraries. We will do the data handling and casting in the interface code, not in the core CCTW feature sections.
Ok, I would like to sketch the Tcl interface to this. It will consume a void* (chunk from the network) and produce the output list. Where should I look for the closest current interface? Or should I just make a dummy application feature for now?
I'm thinking that most of the code is already written in the 'master' branch - take
a look at
https://sourceforge.net/p/cctw/code/ci/master/tree/cctwtcl/cctwtcl_commands.cpp
The only thing is that that code used integers to represent C pointers to tcl - I think a better way would be to use tcl byte array objects instead.
Ah- we are not using SWIG. Ok, we can use Tcl byte array.
Ok, should I be working in the master branch? For the input() and transform() interfaces, I was pasting in from the deleted code.
No - don't use the master branch - it's totally out of date.
Pasting code should be fine.
Got it, I'm working in the branch 'refactor'.
Ok, the skeleton is in cctwtcltest-3 . I am now working on the step:
I will start looking but let me know if you have a plan here.
Now thinking I will create a method CctwDataChunk::setBuffer() to swap in the buffer provided by Swift.
That's in, now looking for transform()...