# Calling C with a tuple where I write the C to parse the tuple

**URL:** <https://discourse.julialang.org/t/calling-c-with-a-tuple-where-i-write-the-c-to-parse-the-tuple/65530>\
**Category:** General Usage\
**Created:** [July 29, 2021, 10:32pm UTC](https://discourse.julialang.org/t/calling-c-with-a-tuple-where-i-write-the-c-to-parse-the-tuple/65530 "2021-07-29T22:32:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bootchk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bootchk/32/27668_2.png) [@bootchk](https://discourse.julialang.org/u/bootchk)\
**Post date:** [July 29, 2021, 10:32pm UTC](https://discourse.julialang.org/t/calling-c-with-a-tuple-where-i-write-the-c-to-parse-the-tuple/65530/1 "2021-07-29T22:32:31Z")

</div>

From Julia, I want to call a C program and pass a tuple.  
Tuple is variable length.  
Tuple is actually written by a third party.  
The domain is a GIMP plugin.  
A third party author will write the Julia, calling GIMP procedures ( in the so-called GIMP PDB.)  
I am writing the C, it is not an existing library, it will be glue to GIMP.  
So I think I can use the jl\_ functions to do introspection of the tuple,  
iterating over it, getting the values, determining their types, and marshalling them into values for GIMP.

Does that sound doable?

Is there an example or similar project?

I am having trouble with declaring the types for such a function to a ccall?

It might be similar to what the GIMP ScriptFu plugin does: access TinyScheme internal data structures.
