Commits

Armin Rigo  committed e92c620

Insert spaces around '__dotdotdot__'.

  • Participants
  • Parent commits f8d43ec
  • Branches cpy-extension

Comments (0)

Files changed (2)

File cffi/cparser.py

     for number, match in enumerate(reversed(matches)):
         p = match.start()
         assert csource[p:p+3] == '...'
-        csource = '%s__dotdotdot%d__%s' % (csource[:p], number, csource[p+3:])
-    return csource.replace('...', '__dotdotdot__')
+        csource = '%s __dotdotdot%d__ %s' % (csource[:p], number,
+                                             csource[p+3:])
+    return csource.replace('...', ' __dotdotdot__ ')
 
 class Parser(object):
     def __init__(self):

File testing/test_verify.py

 
 def test_missing_typedef():
     ffi = FFI()
-    ffi.cdef("typedef ... foo_t; int bar(foo_t *);")
+    ffi.cdef("typedef...foo_t; int bar(foo_t *);")
     py.test.raises(TypeError, ffi.new, "foo_t")
     lib = ffi.verify("typedef struct foo_s { int x; } foo_t;\n"
                      "int bar(foo_t *f) { return 42; }\n")