'Return a string giving the C type \'cdecl\', which may be itself
a string or a <ctype> object.  If \'replace_with\' is given, it gives
extra text to append (or insert for more complicated C types), like
a variable name, or \'*\' to get actually the C type \'pointer-to-cdecl\'.'

def getctype(self, cdecl, replace_with=''):

    if isinstance(cdecl, basestring):
        cdecl = self._typeof(cdecl)
    replace_with = replace_with.strip()
    if (replace_with.startswith('*') and ('&[' in self._backend.getcname(cdecl, '&'))):
        replace_with = ('(%s)' % replace_with)
    elif (replace_with and (not (replace_with[0] in '[('))):
        replace_with = ('    ' + replace_with)
    return self._backend.getcname(cdecl, replace_with)
