def create_string_buffer(init, size=None, encoding=sys.getdefaultencoding()):
if isinstance(init, six.string_types + (six.binary_type,)):<EOL><INDENT>if size is None:<EOL><INDENT>size = len(init) + <NUM_LIT:1><EOL><DEDENT>buftype = c_char * size<EOL>buf = buftype()<EOL>try:<EOL><INDENT>buf.value = init.encode(encoding)<EOL><DEDENT>except AttributeError:<EOL><INDENT>buf.value = init<EOL><DEDENT>return buf<EOL><DEDENT>elif isinstance(init, six.integer_types):<EOL><INDENT>buftype = c_char * init<EOL>buf = buftype()<EOL>return buf<EOL><DEDENT>raise TypeError(init)<EOL>
create_string_buffer(aString) -> character array
    create_string_buffer(anInteger) -> character array
    create_string_buffer(aString, anInteger) -> character array