title: How to wrap a CFFI function in Numba taking Pointers
body: <p>It should be a easy task, but I can't find a way how to pass a pointer of a scalar value to a CFFI function within a Numba function. Passing a pointer to an array works without problems using <code>ffi.from_buffer</code>.</p>
  
  <p><strong>Example function</strong></p>
  
  <pre><code>import cffi
  
  ffi = cffi.FFI()
  defs="void foo_f(int a,double *b);"
  ffi.cdef(defs, override=True)
  source="""
  #include &lt;stdio.h&gt;;
  void foo_f(int a,double *b){
    printf("%i",a);
    printf("   ");
    printf("%f",b[0]);
    }
  
  """
  ffi.set_source(module_name="foo",source=source)
  ffi.compile()
  </code></pre>
  
  <p><strong>Passing a pointer to an array</strong></p>
  
  <pre><code>import numpy as np
  import numba as nb
  import cffi
  ffi = cffi.FFI()
  import numpy as np
  import ctypes
  import foo
  nb.cffi_support.register_module(foo)
  foo_f = foo.lib.foo_f
  
  @nb.njit()
  def Test(a,b):
    a_wrap=np.int32(a)
    #This works for an array
    b_wrap=ffi.from_buffer(b.astype(np.float64))
    foo_f(a_wrap,b_wrap)
  
  
  a=64.
  b=np.ones(5)
  Test(a,b)
  </code></pre>
  
  <p>This works without problems, but how can I modify the <code>Test</code> function to take a scalar value <code>b=5.</code> without modifying the CFFI-function itself?</p>